How can I see the structure of table in SQLite as desc was in Oracle?
How can I see the structure of table in SQLite as desc was in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Invoke the
sqlite3utility on the database file, and use its special dot commands:.tableswill list tables.schema [tablename]will show the CREATE statement(s) for a table or tablesThere are many other useful builtin dot commands — see the documentation at http://www.sqlite.org/sqlite.html, section Special commands to sqlite3.
Example:
Note also that SQLite saves the schema and all information about tables in the database itself, in a magic table named sqlite_master, and it’s also possible to execute normal SQL queries against that table. For example, the documentation link above shows how to derive the behavior of the
.schemaand.tablescommands, using normal SQL commands (see section: Querying the database schema).