create table Employee
EmpFirstName varchar(20) constraint EmpFirstNameRequired not null,
EmpLastName varchar(30) constraint EmpLastNameRequired not null,
EmpEmail varchar(50) constraint EmpEmailRequired not null,
constraint pk_Employee primary key (EmpNo),
constraint UQ_Email unique (EmpEmail),
constraint fk_SupEmpNo foreign key (SupEmpNo) references Employee)
I am having trouble when trying to add data to this table.
select 'E1329594', 'Landi', 'Santos', '(303 789-1234', 'Emailaddress', 'E8843211', 0.02
I get an error message.
Msg 547, Level 16, State 0, Line 69
The INSERT statement conflicted with the FOREIGN KEY SAME TABLE constraint "fk_SupEmpNo". The conflict occurred in database "Homework6", table "dbo.Employee", column 'EmpNo'.
The statement has been terminated.
I know the foreign key is a self-referencing (unary) relationship to itself but I am not sure what I need to do to be able to insert the data without errors.
Recently Asked Questions
- Vector is at a 61° angle and has a magnitude of 85. Describe this vector using vector notation. (Use the and symbols.) (5 points)
- Please refer to the attachment to answer this question. This question was created from AB221_Unit_6_Quiz_Customer_Service. Additional comments: "Which of the
- Please refer to the attachment to answer this question. This question was created from AB221_Unit_6_Quiz_Customer_Service. Additional comments: "A customer