This problem has been solved, by the use of sequences. If you can't use them as a default, you can use them instead of MAX(clipid) You would use NEXTVAL(clipid_seq) assuming you had first done CREATE SEQUENCE clipid_seq; SELECT SETVAL('clipid_seq', (select MAX(clipid) from whatevertable)); This will guarantee no duplicates. It will not guarantee no missing values. On 10 Apr 2006 22:43:16 -0700, v.suryaprabha@xxxxxxxxx <v.suryaprabha@xxxxxxxxx> wrote: > Hi > Now we cannot change the field type. Because already our application > is running and thousands of records are already entered. we are getting > same no for clipid when 2 users are entering data at a time. so how to > solve the problem > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend >