Database / SQLite Interview questions
What is the sqlite3 command-line shell used for?
sqlite3 is SQLite's official interactive command-line tool for opening a database file, running
SQL directly, and inspecting schema — the most common way to explore or debug a SQLite database without
writing any application code.
$ sqlite3 mydata.db sqlite> .tables sqlite> .schema person sqlite> SELECT * FROM person;
Beyond plain SQL, it supports "dot commands" (starting with .) for shell-specific operations
like .tables (list tables), .schema (show a table's CREATE TABLE
statement), .mode (change output formatting, e.g. to CSV), and .backup (create a
backup file) — these dot commands are specific to the shell tool itself, not part of standard SQL.
More Related questions...