Re: [sqlite] Determining an auto increment primary key

2004-03-07 Thread Will Leshner
Do you have a table with an integer primary key and you are trying to find the index for it in sqlite_master? An integer primary key does not create an index, so you won't find any information about it in sqlite_master. - To un

RE: [sqlite] Determining an auto increment primary key

2004-03-07 Thread Fred Williams
messing with data tables, testing multi restricted selects, and see what's up. Fred -Original Message- From: Kurt Welgehausen [mailto:[EMAIL PROTECTED] Sent: Sunday, March 07, 2004 12:25 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Determining an auto increment primary key >>

Re: [sqlite] Determining an auto increment primary key

2004-03-07 Thread Kurt Welgehausen
>> PRAGMA index_info(index-name)...I am getting an empty result set You can get index names from sqlite_master: sqlite> select * from sqlite_master where type='index' and tbl_name='Persons'; typenametbl_namerootpagesql --

Re: [sqlite] Determining an auto increment primary key

2004-03-06 Thread Will Leshner
On Mar 6, 2004, at 11:01 PM, Fred Williams wrote: But when attempting the same trick for indexes with: "PRAGMA index_info(index-name)" I am getting an empty result set. What is the structure of the index-name? I believe index-name is just whatever name you used to create the index. ---

RE: [sqlite] Determining an auto increment primary key

2004-03-06 Thread Fred Williams
Subject: Re: [sqlite] Determining an auto increment primary key > On Mar 6, 2004, at 3:25 PM, Richard Heyes wrote: > > > Is there a de-facto method of determining if a column is an INTEGER > > PRIMARY > > KEY column (ie the auto increment type). Best I can come up with

Re: [sqlite] Determining an auto increment primary key

2004-03-06 Thread Richard Heyes
> On Mar 6, 2004, at 3:25 PM, Richard Heyes wrote: > > > Is there a de-facto method of determining if a column is an INTEGER > > PRIMARY > > KEY column (ie the auto increment type). Best I can come up with is > > checking > > the type and if it has a unique index on it, which isn't definitive >

Re: [sqlite] Determining an auto increment primary key

2004-03-06 Thread Will Leshner
On Mar 6, 2004, at 3:25 PM, Richard Heyes wrote: Is there a de-facto method of determining if a column is an INTEGER PRIMARY KEY column (ie the auto increment type). Best I can come up with is checking the type and if it has a unique index on it, which isn't definitive since it could just be an

[sqlite] Determining an auto increment primary key

2004-03-06 Thread Richard Heyes
Is there a de-facto method of determining if a column is an INTEGER PRIMARY KEY column (ie the auto increment type). Best I can come up with is checking the type and if it has a unique index on it, which isn't definitive since it could just be an integer column with a unique index. Thanks. -- Ric