jpwhite3/northwind-SQLite3

Shouldn't EmployeeID references to ReportsTo?

Closed this issue · 1 comments

EmployeeID referring to EmployeeID seems weird. I tried it works, but shouldn't the foreign key be set to ReportsTo column?

FOREIGN KEY ([EmployeeID]) REFERENCES [Employees] ([EmployeeID])

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

Thanks for reporting the issue. Script has been updated.