2014-2015学年第一学期
《数据库原理》
课程实验报告
.. .. ..
学 号: 20122617
.专业资料.
学生姓名: 徐玉松
班 级: 软件工程2012
教 师: 陶宏才
辅导老师: 王泽洲 赵红芳
2014年12月
.. .. ..
实验一:表及约束的创建
1.1 实验目的与内容
目的:创建数据表、添加和删除列、实现所创建表的完整性约束。 内容:11-2、11-26~33。
注:实验内容编号均取自《数据库原理及设计(第2版)》第11章的实验!即:实验内容以第2版教材为准!
报告:以11-31作为实验一的报告。
1.2 实验代码及结果
1.2.1 实验代码
create table person20122617 ( )
create table customer20122617 (
Cust_no char(6) primary key, P_no char(6) primary key, P_name varchar(10) not null, Sex char(2) not null, Birthdate datetime null, Date_hired datetime not null,
Deptname varchar(10) not null DEFAULT'培训部', P_boss char(6) null,
constraint birth_hire_check --为约束创建一个名称 check (Birthdate --创建新表 .专业资料.
相关推荐: