SQLite - How to show all columns in a table?
Show all columns in a SQLite table
1. Using SQL Query
To see the table creation query:
SELECT sql FROM sqlite_master
WHERE tbl_name = 'table_name' AND type = 'table'
To list all columns and properties:
PRAGMA table_info(table_name);
2. Using TablePlus
In TablePlus, you can either open the Query Editor and run the statements above, or see all columns from the GUI’s table structure view:
From the table data view, to switch to structure view, click on the Structure button at the bottom of the window, or press Command + Control + ].
New to TablePlus? It’s a GUI client for multiple relational databases which is native, beautiful, and available for free. Check it out:
Not on Mac? Download TablePlus for Windows.
On Linux? Download TablePlus for Linux
Need a quick edit on the go? Download TablePlus for iOS