Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kisielk
Last active December 31, 2015 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kisielk/7920552 to your computer and use it in GitHub Desktop.
Save kisielk/7920552 to your computer and use it in GitHub Desktop.
SQLite cares not for schemas.
~ $ sqlite3 foo.db
SQLite version 3.7.13 2012-07-17 17:46:21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table foo ( f varchar(1) );
sqlite> .schema
CREATE TABLE foo ( f varchar(1) );
sqlite> insert into foo values ("hello world");
sqlite> select * from foo;
hello world
sqlite> create table bar ( b integer );
sqlite> .schema
CREATE TABLE bar ( b integer );
CREATE TABLE foo ( f varchar(1) );
sqlite> insert into bar values ("a string");
sqlite> select * from bar;
a string
sqlite> create table baz ( c monkey );
sqlite> .schema
CREATE TABLE bar ( b integer );
CREATE TABLE baz ( c monkey );
CREATE TABLE foo ( f varchar(1) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment