Created
July 21, 2009 02:29
-
-
Save rich/151063 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create table categories ( | |
| id serial, | |
| parent_id int4 references categories (id), | |
| name varchar(100), | |
| primary key (id) | |
| ); | |
| insert into categories (name) values ('one'), ('two'), ('three'); | |
| insert into categories (parent_id, name) values (1, 'cat'), (1, 'dog'), (1, 'bird'), (3, 'no'), (3, 'yes'), (3, 'maybe'), (8, 'good'), (8, 'bad'), (8, 'evil'), (4, 'diabetes'), (4, 'wilford brimley'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment