|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
error with a table ???
hi all ...
i am working on a hotel reservation system ... i finished the design and am working on the coding now ... the problem is SQL is giving me error massage where is no error !!! i have search in the net but couldnt find anything here is the table that gives me error SQL> CREATE TABLE GUEST_ROOM 2 ( 3 ROOM_NO NUMBER(3), 4 RESERVATION_NO NUMBER(5), 5 GUEST_NUMBER NUMBER(5) , 6 ACTUAL_CHECKIN_DATE DATE NOT NULL, 7 ACTUAL_CHECKOUT_DATE DATE NOT NULL , 8 CONSTRAINT ROOM_NO_FK FOREIGN KEY 9 REFERENCES ROOM_NO (ROOM_NO), 10 CONSTRAINT ROOM_RESERVATION_NO_FK FOREIGN KEY (RESERVATION_NO) 11 REFERENCES RESERVATION (RESERVATION_NO), 12 CONSTRAINT ROOM_GUEST_NUMBER_FK FOREIGN KEY (GUEST_NUMBER) 13 REFERENCES GUEST (GUEST_NUMBER) 14 ); REFERENCES ROOM_NO (ROOM_NO), * ERROR at line 9: ORA-00906: missing left parenthesis i am attaching all the tables if anyonw interested in helping me thanks and regards... |
|
#2
|
|||
|
|||
|
at line 8 after "FOREIGN KEY" add "(ROOM_NO)"
|
|
#3
|
|||
|
|||
|
Just a side note: are you sure your hotels will never have more then 999 rooms?
|
|
#4
|
|||
|
|||
|
foreing key.
hi,
you were missing the references table name. try this, create table guest_room ( room_no number(3), reservation_no number(5), guest_no number(5), act_checkin_date date not null, act_checkout_date date not null, constraint fk_room_no foreign key(room_no) references room_details(room_no), constraint fk_reservation_no foreign key(reservation_no) reservation_details(reservation_no), constraint fk_room_guest_no foreign key(guest_no) references guest_details(guest_no) ) / bye.............. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > error with a table ??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|