我创建了表Employee
Create table Employee ( FName varchar(20) Not Null,LName varchar(20) Not Null,SSN int Not Null,BDate Datetime,Address varchar(50),Sex char(1),Salary money,Super_SSN int,Primary Key(SSN),Foreign Key(Super_SSN) references Employee(SSN) )@H_403_4@当我尝试插入第一行时,
insert into Employee(FName,LName,SSN,BDate,Address,Sex,Salary,Super_SSN) values('John','Smith',12345,'1965-01-09','Houston,TX','M',30000,33344)@H_403_4@我收到的错误就像.. @H_403_4@错误:
@H_403_4@The INSERT statement conflicted with the FOREIGN KEY SAME TABLE constraint “FK_Employee_Employee”. The conflict occurred in database “Company”,table “dbo.Employee”,column ‘SSN’.