很基础的sql语句的使用示例
用SQL语句创建如下三个基本表:学生表(Student)、课程表(Course)、学生选课表(SC),结构如下所示
Student表结构
Create table Student ( )
Course
表结构
Create table course ( )
SC表结构
Cno varchar(10) primary key, Cname varchar(20) not null, Ccredit int check(Sctedit>0), Semester int check(Semester>0), Period int check(Period>0)
Sno varchar(7) primary key, Sname varchar(10) not null,
Ssex char (2) check(Ssex=‘男’or Ssex=’女’), Sage int check(Sage between 15 and 45), Sdept varchar(20) default(‘计算机系’)
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库SQL语句创建学生信息数据库表的示例在线全文阅读。
相关推荐: