Here you can use the "foreign key" within the same table...
create table employee (
empID int IDENTITY(1,1) PRIMARY KEY,
managerID int FOREIGN KEY REFERENCES employee (empID),
...)
NB we could have written REFERENCES and omitted the keywords FOREIGN KEY.
No comments:
Post a Comment