Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE Rota (
- RotaId INT NOT NULL IDENTITY(1, 1) PRIMARY KEY,
- EmployeeId INT NOT NULL FOREIGN KEY REFERENCES Employee(Employee),
- -- Other columns
- )
- CREATE TABLE EmployeeOvertime (
- EmployeeOvertimeId INT NOT NULL IDENTITY(1, 1) PRIMARY KEY,
- EmployeeId INT NOT NULL FOREIGN KEY REFERENCES Employee(Employee),
- -- Other columns
- )
- CREATE TABLE RotaOvertime (
- RotaId INT NOT NULL FOREIGN KEY REFERENCES Rota(RotaId),
- EmployeeOvertimeId INT NOT NULL FOREIGN KEY REFERENCES EmployeeOvertime(EmployeeOvertimeId),
- UNIQUE (RotaId, EmployeeOvertimeId)
- )
Add Comment
Please, Sign In to add comment