Sorry for the rookie question. I have a sqlite file and I need to get table column names. How can I get them?
Asked
Active
Viewed 724 times
1
-
If you are using FIrefox (or don't mind using installing ti just for this purpose): https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/ – kylieCatt May 19 '15 at 15:15
2 Answers
2
SELECT sql FROM sqlite_master
WHERE tbl_name = 'table_name' AND type = 'table'
Then parse this value with Reg Exp.
You can also use:
PRAGMA table_info(table_name)
2
use the pragma table_info(spamtable)
command. The table names will be index 1 of the returned tuples.

Christopher Pearson
- 1,113
- 1
- 10
- 26