How to get a list of column names on Sqlite3 database?
Solution 1:
PRAGMA table_info(table_name);
will get you a list of all the column names.
Solution 2:
If you have the sqlite database, use the sqlite3 command line program and these commands:
To list all the tables in the database:
.tables
To show the schema for a given tablename
:
.schema tablename
Solution 3:
If you do
.headers ON
you will get the desired result.