Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE Trips
- (
- Id INT PRIMARY KEY IDENTITY,
- RoomId INT NOT NULL
- CONSTRAINT FK_Trips_Rooms FOREIGN KEY (RoomId) REFERENCES Rooms(Id),
- BookDate DATETIME NOT NULL,
- ArrivalDate DATETIME NOT NULL,
- ReturnDate DATETIME NOT NULL,
- CancelDate DATETIME,
- CONSTRAINT CHK_IfBeforeArrivalDate CHECK(BookDate < ArrivalDate),
- CONSTRAINT CHK_IfBeforeReturnDate CHECK(ArrivalDate < ReturnDate),
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement