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!
From http://www.sqlite.org/sqlite.html:
.schema {tablename}
in the SQLite console will print out the CREATE statement.
Just run the .header on
it will start showing column name in select statements.
精彩评论