Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Invoke the <code>sqlite3</code> utility on the database file, and use its special dot commands:</p> <ul> <li><code>.tables</code> will list tables</li> <li><code>.schema [tablename]</code> will show the CREATE statement(s) for a table or tables</li> </ul> <p>There are many other useful builtin dot commands -- see the documentation at <a href="http://www.sqlite.org/sqlite.html" rel="noreferrer">http://www.sqlite.org/sqlite.html</a>, section <strong>Special commands to sqlite3</strong>.</p> <p>Example:</p> <pre><code>sqlite&gt; entropy:~/Library/Mail&gt;sqlite3 Envelope\ Index SQLite version 3.6.12 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite&gt; .tables addresses ews_folders subjects alarms feeds threads associations mailboxes todo_notes attachments messages todos calendars properties todos_deleted_log events recipients todos_server_snapshot sqlite&gt; .schema alarms CREATE TABLE alarms (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, alarm_id, todo INTEGER, flags INTEGER, offset_days INTEGER, reminder_date INTEGER, time INTEGER, argument, unrecognized_data BLOB); CREATE INDEX alarm_id_index ON alarms(alarm_id); CREATE INDEX alarm_todo_index ON alarms(todo); </code></pre> <p>Note also that SQLite saves the schema and all information about tables in the database itself, in a magic table named <em>sqlite_master</em>, 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 <code>.schema</code> and <code>.tables</code> commands, using normal SQL commands (see section: <strong>Querying the database schema</strong>).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload