【发布时间】:2017-06-17 02:14:50
【问题描述】:
我正在尝试添加员工的名字,但我不断收到错误消息。我已经根据我看过的类似问题和视频尝试了更改,但似乎没有任何东西可以摆脱错误。
create table `Employee Information`.`Employee`(
`EmployeeID` int not null,
`EmployeeFirstName` varchar(255) not null,
`EmployeeLastName` varchar(255) not null,
`SupervisorID` int not null,
primary key (`EmployeeID`),
foreign key (`SupervisorID`) references employee (`EmployeeID`)
on delete no action
on update no action
);
insert into `Employee` (EmployeeID, EmployeeFirstName, EmployeeLastName, SupervisorID) values (1, `John`, `Smith`, 52);
有什么帮助吗?
【问题讨论】:
-
创建表
Employee Information.Employee(EmployeeIDint not null,EmployeeFirstNamevarchar(255) not null,EmployeeLastNamevarchar(255) not null,SupervisorIDint not null,主键 (EmployeeID),外键 (SupervisorID) 引用员工 (EmployeeID) 删除时不执行更新时不执行操作); ::::: 为重复的评论道歉是为了让表格更干净一些。