-1
有人能告訴我爲什麼我得到這個錯誤嗎?謝謝!SQL缺少右括號ORA-00907
CREATE TABLE Booking (
hotelNo char(2) NOT NULL,
guestNo char(2) NOT NULL,
dateFrom date NOT NULL,
dateTo date
roomNo char(2) NOT NULL,
CONSTRAINT booking_pk PRIMARY KEY (hotelNo, guestNo, dateFrom),
CONSTRAINT booking_hotel_fk FOREIGN KEY (hotelNo) REFERENCES
CONSTRAINT booking_guest_fk FOREIGN KEY (guestNo) REFERENCES Guest(guestNo),
CONSTRAINT booking_room_fk FOREIGN KEY (hotelNo, roomNo)
REFERENCES Room(hotelNo, roomNo)
);
我錯過了'酒店(hotelNo)':P –
謝謝您的答覆。我會盡快嘗試,SQLFiddle現在剛剛下線:-( – Starbucks
它工作,謝謝。 – Starbucks