Skip to content

Instantly share code, notes, and snippets.

@wjessop
Created August 29, 2011 11:43
Show Gist options
  • Save wjessop/1178237 to your computer and use it in GitHub Desktop.
Save wjessop/1178237 to your computer and use it in GitHub Desktop.
test_db=> CREATE TABLE foo (
test_db(> id serial,
test_db(> thing varchar(40) NOT NULL
test_db(> );
NOTICE: CREATE TABLE will create implicit sequence "foo_id_seq" for serial column "foo.id"
CREATE TABLE
test_db=> insert into foo (thing) values ('test');
INSERT 0 1
test_db=> insert into foo (thing) values ('test2');
INSERT 0 1
test_db=> insert into foo (thing) values ('test3');
INSERT 0 1
test_db=> select * from foo;
id | thing
----+-------
1 | test
2 | test2
3 | test3
(3 rows)
test_db=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment