Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread John Machin
On 24/07/2009 3:10 PM, Simon Slavin wrote: > On 24 Jul 2009, at 5:49am, John Machin wrote: > >> On 24/07/2009 3:22 AM, Simon Slavin wrote: >> >>> And note that if you have a column which is an integer that >>> has doesn't allow duplicates, SQLite will automatically use that >>> column as the one i

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Simon Slavin
On 24 Jul 2009, at 5:49am, John Machin wrote: > On 24/07/2009 3:22 AM, Simon Slavin wrote: > >> And note that if you have a column which is an integer that >> has doesn't allow duplicates, SQLite will automatically use that >> column as the one it uses for _rowid_, etc.. So define your own >> in

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread John Machin
On 24/07/2009 3:22 AM, Simon Slavin wrote: > And note that if you have a column which is an integer that > has doesn't allow duplicates, SQLite will automatically use that > column as the one it uses for _rowid_, etc.. So define your own > integer column, feed it whatever integers you want,

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread P Kishor
nal Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jay A. Kreibich > Sent: Thursday, July 23, 2009 1:31 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Defining a table that starts rowid as 0 > >

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Shaun Seckman (Firaxis)
Discussion of SQLite Database Subject: Re: [sqlite] Defining a table that starts rowid as 0 On Thu, Jul 23, 2009 at 06:22:53PM +0100, Simon Slavin scratched on the wall: > > On 23 Jul 2009, at 4:56pm, Rich Shepard wrote: > > > Using rowid for anything is not a good idea. There&#

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Jay A. Kreibich
On Thu, Jul 23, 2009 at 06:22:53PM +0100, Simon Slavin scratched on the wall: > > On 23 Jul 2009, at 4:56pm, Rich Shepard wrote: > > > Using rowid for anything is not a good idea. There's no guarantee > > that the > > column values associated with each rowid are static. It's much > > better

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Simon Slavin
On 23 Jul 2009, at 4:56pm, Rich Shepard wrote: > Using rowid for anything is not a good idea. There's no guarantee > that the > column values associated with each rowid are static. It's much > better to > ignore the rowid and use either a natural primary key or a defined > one. Agreed.

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Rich Shepard
On Thu, 23 Jul 2009, Shaun Seckman (Firaxis) wrote: >Is it possible in the create a table where the rowid > will start at 0 instead of 1 prior to inserting a row and explicitly > stating that the rowid is 0? Shaun, Using rowid for anything is not a good idea. There's no guaran

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Igor Tandetnik
Shaun Seckman (Firaxis) wrote: >Is it possible in the create a table where the rowid > will start at 0 instead of 1 prior to inserting a row and explicitly > stating that the rowid is 0? You can specify rowid explicitly in an insert statement: insert into mytable(rowid, ...) valu

[sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Shaun Seckman (Firaxis)
Hello, Is it possible in the create a table where the rowid will start at 0 instead of 1 prior to inserting a row and explicitly stating that the rowid is 0? -Shaun ___ sqlite-users mailing list sqlite-users@sqlite.org http://s