hallo, list...

how do I get primary key information about a table?

[EMAIL PROTECTED]:~$ sqlite3 /data/mariof/test.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> drop table test;
sqlite> create table test (pk integer primary key, name varchar(32), info integer);
sqlite> create unique index itest on test (name);
sqlite> pragma index_list(test);
0|itest|1
sqlite> pragma table_info(test);
0|pk|integer|0||1
1|name|varchar(32)|0||0
2|info|integer|0||0
sqlite> pragma foreign_key_list(test);
sqlite>

I would have expected to see something like this:
sqlite> pragma index_list(test);
0|test_pkey|1
1|itest|1

that is, that primary keys be treated as unique indices with a standard naming pattern. what is the deal?

thanks,
Mario

Reply via email to