摘要:
先建如下表:Student(S#,Sname,Sage,Ssex)学生表 Course(C#,Cname,T#)课程表 SC(S#,C#,score)成绩表 Teacher(T#,Tname)教师表误区:建好表后急于添加数据,再去添加外键约束。use SqlDemo--Select TABLE_NAME FROM SqlDemo.INFORMATION_SCHEMA.TABLES Where TABLE_TYPE='BASE TABLE' if exists(select * from Student)drop table Student;goif exists(select 阅读全文