create table table2 (
uid int NOT NULL,
table1_uid int NOT NULL,
primary ket(uid).
constranint name foreign key(table1_uid) references table1(uid),
)type=InnoDB;