On Tue, 18 Sep 2007 15:18:27 +0530, you wrote:
>All,
>
>
>
>Is there any API in sqlite3 which will provide the Primary keys of the table
>and also the Non-primary keys of the table?
Here is something to start with:
SQLite v3.4.2
CREATE TABLE persons(
person_id INTEGER PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
dtstamp DATETIME DEFAULT CURRENT_TIMESTAMP);
CREATE INDEX idx_persons_name ON persons(name);
PRAGMA table_info(persons);
cid name type notnull dflt_value pk
--- ---------- -------- ------- ---------- ----------
0 person_id INTEGER 99 1
1 name TEXT 99 0
2 dtstamp DATETIME 0 CURRENT_TI 0
--
( Kees Nuyt
)
c[_]
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------