|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
error in table ...how to fix it ?
hi all
am working on a Hotel Reservation program ... and i have a proble with my tables... i already finish the design and it seems ok for me ...but when i came to create the SQL Code for the tables it didnt work ... its giving me an error massage where is no error ... i seached and tryed my best to find a soulution but i couldnt ... the error massage am getting is ERROR at line 9: ORA-00906: missing left parenthesis all the parenthesis are exsist ... could any one help me with this ... here is the table that is not working ... CREATE TABLE GUEST_ROOM ( ROOM_NO NUMBER(3), RESERVATION_NO NUMBER(5), GUEST_NUMBER NUMBER(5) , ACTUAL_CHECKIN_DATE DATE NOT NULL, ACTUAL_CHECKOUT_DATE DATE NOT NULL , CONSTRAINT ROOM_NO_FK FOREIGN KEY REFERENCES ROOM_NO (ROOM_NO), CONSTRAINT ROOM_RESERVATION_NO_FK FOREIGN KEY (RESERVATION_NO) REFERENCES RESERVATION (RESERVATION_NO), CONSTRAINT ROOM_GUEST_NUMBER_FK FOREIGN KEY (GUEST_NUMBER) REFERENCES GUEST (GUEST_NUMBER) ); i am also attaching all the tables ... thanks and regards ... |
|
#2
|
|||
|
|||
|
You forgot to specify the key in the foreign key declaration:
CONSTRAINT ROOM_NO_FK FOREIGN KEY REFERENCES ROOM_NO (ROOM_NO), Should be CONSTRAINT ROOM_NO_FK FOREIGN KEY (ROOM_NO) REFERENCES ROOM_NO (ROOM_NO), |
|
#3
|
|||
|
|||
|
thaaaaaaaaaaaaaanx friend ... it works now ...
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > error in table ...how to fix it ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|