实验三
一.
create table Students
(
Sno char(5) not null,
Sname char(20) not null,
Ssex char(2),
Sage int,
Sdept char(15),
constraint un_Sno unique(Sno),
constraint un_Sname unique(Sname),
)
create table Courses
(
Cno char(5),
Cname char(20),
Pre_Cno char(5),
Credits int
);
create table Reprots
(
Sno char(5),
Cno char(5),
Grade int,
constraint un_sno_cno unique(Sno,Cno)
);
二.
alter table Students
add Sentrancedate DATETIME;
alter table Students
alter column Sage SMALLINT;
alter table Students
drop constraint un_Sname;
实验六
insert
into History_student(Sno,Sname,Ssex,Sage,Sdept)
select Sno,Sname,Ssex,Sage,Sdept
from student;