开发者

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

开发者 https://www.devze.com 2023-01-10 13:30 出处:网络
All I know is only table name, and id value on which I want to perform query, but I do no开发者_Python百科t know what is id called in that table.You can probably lookup the column name for the primary

All I know is only table name, and id value on which I want to perform query, but I do no开发者_Python百科t know what is id called in that table.


You can probably lookup the column name for the primary key column(s) using the answer to a quite similar question..

sqlite> pragma table_info(...)

It should also work programmatically, if needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号