Commit | Line | Data |
eaaa8f8a |
1 | create table pet ( |
2 | "pet_id" int, |
3 | "person_id" int |
ea4a3ecc |
4 | constraint fk_person_id references person(person_id) on update CASCADE on delete RESTRICT, |
565563b9 |
5 | "person_id_2" int |
6 | constraint fk_person_id_2 references person(person_id) on update SET NULL on delete SET DEFAULT, |
7 | "person_id_3" int |
8 | constraint fk_person_id_3 references person(person_id) on update NO ACTION, |
eaaa8f8a |
9 | "name" varchar(30), |
10 | "age" int, |
11 | constraint age_under_100 check ( age < 100 ), |
12 | constraint pk_pet primary key (pet_id, person_id) |
13 | ); |