How to get a list of column names on Sqlite3 database? How to get a list of column names on Sqlite3 database? sqlite sqlite

How to get a list of column names on Sqlite3 database?


PRAGMA table_info(table_name);

will get you a list of all the column names.


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


If you do

.headers ON

you will get the desired result.