How to get primary key column names for a given table?

All I know is just the name of the table and the id value on which I want to execute the query, but I do not know what the id that is called in this table is.

+5
source share
1 answer

You can probably find the column name for the primary key columns using an answer to a fairly similar question .

sqlite> pragma table_info(...)

It should also work programmatically, if necessary.

+6
source

All Articles