Shouldn't EmployeeID references to ReportsTo?
Closed this issue · 1 comments
metinsenturk commented
EmployeeID referring to EmployeeID seems weird. I tried it works, but shouldn't the foreign key be set to ReportsTo
column?
I checked the Microsoft SQL samples for this table and they also have it referred to ReportsTo
. Have a look at microsoft/sql-server-samples.
Correct foreignkeyconstraint should be:
FOREIGN KEY ([ReportsTo]) REFERENCES [Employees] ([EmployeeID])
ON DELETE NO ACTION ON UPDATE NO ACTION
jpwhite3 commented
Thanks for reporting the issue. Script has been updated.