Skip to content

Instantly share code, notes, and snippets.

@dsmith
Created November 23, 2013 20:30
Show Gist options
  • Save dsmith/7619545 to your computer and use it in GitHub Desktop.
Save dsmith/7619545 to your computer and use it in GitHub Desktop.
FOREIGN KEY(id) REFERENCES player (id), \n\tCHECK (throws IN ((0,), (1,))), \n\tCHECK (bats IN ((0,), (1,)))\n)\n\n'
CREATE TABLE baseball_player (
id INTEGER NOT NULL,
number_bats INTEGER,
throws VARCHAR(1),
bats VARCHAR(1),
number INTEGER,
experience INTEGER,
PRIMARY KEY (id),
FOREIGN KEY(id) REFERENCES player (id),
CHECK (throws IN ((0,), (1,))),
CHECK (bats IN ((0,), (1,)))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment