一.所花时间
2h
二.代码量
30行
三.博客量
1篇
四.了解到的知识点
第三章
10.(1)create table 图书(
书号 nchar(6) primary key,
书名 nvarchar(30) not null,
作者名 char(10) not null,
出版日期 smalldatatime,
价格 numeric(4,1)
);
(2)create table 书店(
书店编号 nchar(6) primary key,
店名 nvarchar(30) not null,
电话 char(8),
地址 varchar(40),
邮政编码 char(6)
);
(3)create table 图书销售(
书号 nchar(6) not null,
书店编号 nchar(6) not null,
销售日期smalldatatime not null,
销售数量 tinyint check(销售数量)>=1),
primary key(书号,书店编号,销售日期),
foreign key(书号) references 图书(书号),
foreign key(书店编号) references 书店(书店编号)
);
11.alter table 图书 add 印刷数量 int check(印刷数量>=1000);
12.alter table 书店 drop column 邮政编码;
13.alter table 图书销售 alter column 销售数量 int;
浙公网安备 33010602011771号