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
- a) How would your results differ if your data were not limited to those data points corresponding to the most linear region of your standard additions curv e?
- Your client, Sam Jackson, is an avid Boston Red Sox fan. Last April at the Red Sox first game, as a result of a random drawing of those in attendance at the
- What are the pros and cons of quantitative research design?