But if I delete a chunk of data then how can I know the id number. Nikhil
On Wed, Nov 26, 2008 at 4:08 PM, Martin Engelschalk < [EMAIL PROTECTED]> wrote: > Hi, > > after a > delete from history where id = 15 > you could do a > update history set id = id - 1 where id > 15 > > However, it is not a good idea to change a primary key, especially if > there are other data in other tables depending on it. > > Martin > > Nikhil Kansal wrote: > > Hi, > > > > I am using id as a integer primary key... > > like > > CREATE TABLE history( id INTEGER PRIMARY KEY, filename varchar NOT NULL) > > now if i delete a entry from this table and add a entry again then a id > will > > be left blank in between. > > > > Can we rearrange this ID. > > > > Regards, > > Nikhil > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > > * Codeswift GmbH * > Traunstr. 30 > A-5026 Salzburg-Aigen > Tel: +49 (0) 8662 / 494330 > Mob: +49 (0) 171 / 4487687 > Fax: +49 (0) 12120 / 204645 > [EMAIL PROTECTED] > www.codeswift.com / www.swiftcash.at > > Codeswift Professional IT Services GmbH > Firmenbuch-Nr. FN 202820s > UID-Nr. ATU 50576309 > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Nikhil Kumar Kansal Software Engineer, Mango Technologies, Jaipur _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users