On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: > Hi Simon, > The problem is I have rowid which is the PRIMARY Key, and > another column puid which should be unique. Now when I do vacuum rowid > changes, but puid doesn't change and I don't want puid to change. Now it > is possible to make puid itself as PRIMARY KEY, but the problem is I > assign the puid's to the objects (row entries) based upon their type. > For some type of objects I need values from x to x + 1000, for other x + > 1000 to x + 2000 and likewise. Hence I need a generator which can > generate a number from the given range (x, x + 1000) which is not > assigned. > > Regards, > Phani >
Hi Phani, Implicit rowid's might be modified by VACUUM, but values in a column declared 'INTGER PRIMARY KEY' will not. Without knowing your design, it looks like you wish to be able to determine type from the id. This is creating a problem. Can you not store the type separately from the id? Rgds, Simon ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------