照书打的例子怎么错了?
create table Course
(
Cno char(4) primary key,
Cname char(40),
Cpno char(4),
Ccredit smallint,
foreign key Cpno references Course(Cno)
)
报错:服务器: 消息 170,级别 15,状态 1,行 7
第 7 行: 'Cpno ' 附近有语法错误。
------解决方案--------------------create table Course
(
Cno char(4) primary key,
Cname char(40),
Cpno char(4),
Ccredit smallint,
constraint FK foreign key Cpno references Course(Cno)
)