hi,
why not you try, this ,
1. import java.util.Random
2. create a Random class object
3. and use nextInt() instance method to generate a integer number.
4. Concatenate it with primary key and before inserting into table, check whether this key already exist in table , if yes, repeat step 3 again.
ali