SQLite Forum

Windows 3.37.3 sqlite3.exe .schema output includes creation of sqlite_ tables in error (presumably)
Login

Windows 3.37.3 sqlite3.exe .schema output includes creation of sqlite_ tables in error (presumably)

(1) By anonymous on 2022-01-16 13:14:26 [link] [source]

output from this command:

sqlite3 chinook.db .schema

Includes the following statements:

CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE sqlite_stat1(tbl,idx,stat);

These prevent importing the .schema into a new DB.

(2) By Stephan Beal (stephan) on 2022-01-16 13:25:17 in reply to 1 [source]

These prevent importing the .schema into a new DB.

There's a flag for that:

sqlite> .help .schema
.schema ?PATTERN?        Show the CREATE statements matching PATTERN
   Options:
      --indent             Try to pretty-print the schema
      --nosys              Omit objects whose names start with "sqlite_"

(3) By anonymous on 2022-01-16 14:31:29 in reply to 2 [link] [source]

ack, thanks! Missed that one.