【SQL开源代码栏目提醒】:网学会员为广大网友收集整理了,Classonetoone2.sql,希望对大家有所帮助!
CREATE TABLE hibernatedb.classonetoone2 (
classid int(10) NOT NULL ,
studentid int(10) ,
classname varchar(30) default NULL,
PRIMARY KEY (classid)
);
alter table hibernatedb.classonetoone2
add index fkstudentid2(studentid),
add constraint fkstudentid2
foreign key (studentid)
references hibernatedb.studentonetoone2(studentid);