6

All I know is only table name, and id value on which I want to perform query, but I do not know what is id called in that table.

rsk82
  • 28,217
  • 50
  • 150
  • 240
  • Why do you need that abstract number? You don't know its naming => you don't know its meaning => you don't need it. Associative link might be done by another column. – Basilevs Aug 05 '10 at 09:29
  • Well, I know that this number is a ID value in given table, one thing I do not know is the column name under ID's are living in that table. I'm trying to experiment with some pragma statements... But it is not possible to do select on them. – rsk82 Aug 05 '10 at 09:38

1 Answers1

6

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.

Community
  • 1
  • 1
gnab
  • 9,251
  • 1
  • 21
  • 13