Skip to content

Instantly share code, notes, and snippets.

@avar
Created March 14, 2010 17:38
Show Gist options
  • Select an option

  • Save avar/332095 to your computer and use it in GitHub Desktop.

Select an option

Save avar/332095 to your computer and use it in GitHub Desktop.
aoeu tmp (7.3M) $ sqlite3 dbix.sql
SQLite version 3.6.16
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE next_token (
...> id INTEGER PRIMARY KEY NOT NULL,
...> expr_id INTEGER NOT NULL,
...> token_id INTEGER NOT NULL,
...> count INTEGER NOT NULL
...> );
sqlite> SELECT seq FROM sqlite_sequence WHERE name = 'next_token';
SQL error: no such table: sqlite_sequence
sqlite> aoeu tmp (7.3M) $ sqlite3 not-dbix.sql
SQLite version 3.6.16
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE next_token (
...> id INTEGER PRIMARY KEY,
...> expr_id INTEGER NOT NULL,
...> token_id INTEGER NOT NULL,
...> count INTEGER NOT NULL
...> );
sqlite> SELECT seq FROM sqlite_sequence WHERE name = 'next_token';
SQL error: no such table: sqlite_sequence
sqlite> aoeu tmp (7.4M) $ sqlite3 my-db.sql
SQLite version 3.6.16
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE next_token (
...> id INTEGER PRIMARY KEY AUTOINCREMENT,
...> expr_id INTEGER NOT NULL,
...> token_id INTEGER NOT NULL,
...> count INTEGER NOT NULL
...> );
sqlite> SELECT seq FROM sqlite_sequence WHERE name = 'next_token';
sqlite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment