CodeGuy CodeGuy - 2 months ago 14
iOS Question

SQLite3 terminal

How can I figure out the column names of a table using sqlite3 from the terminal on a mac? I forgot what I named the columns and I can't figure out how what the names were. Thanks!

Answer

From http://www.sqlite.org/sqlite.html:

.schema {tablename}

in the SQLite console will print out the CREATE statement.