Commit | Line | Data |
fb3e4caf |
1 | create table person ( |
2 | person_id INTEGER PRIMARY KEY, |
3 | name varchar(20), |
4 | age integer, |
5 | weight double(11,2), |
6 | iq tinyint default '0', |
7 | description text |
8 | ) ENGINE=MyISAM; |
9 | |
10 | create unique index u_name on person (name); |
9ae898b9 |
11 | |
12 | create table employee ( |
13 | position varchar(50), |
14 | employee_id integer, |
6a0f3000 |
15 | CONSTRAINT FK5302D47D93FE702E FOREIGN KEY (employee_id) REFERENCES person (person_id), |
16 | PRIMARY KEY (position, employee_id) |
9ae898b9 |
17 | ) ENGINE=InnoDB; |
18 | |