写了如下命令,为什么中是说我references on附近有语法错误啊?
create table dept
(
dept_id int primary key,
dept_name nvarchar(20) not null,
dept_adress nvarchar(4000)
)
create table emp
(
emp_id int primary key,
emp_name nvarchar(20) not null,
emp_sex nchar(1),
dept_id int foreign key references on dept(dept_id)
)
------解决方案--------------------
去掉on