When I'm run this code getting error saying,
SQL Error: ORA-00905: missing keyword 00905. 00000 - "missing keyword"
*Cause:
*Action: Running it on ORACLE. Not sure how to fix it.
CREATE TABLE LAB4 (
ROOMID1 NUMBER(8) NOT NULL,
BUILDING1 VARCHAR2(25) NOT NULL,
ROOMNO1 VARCHAR2(25) NOT NULL,
CONSTRAINT ROOMPK1 PRIMARY KEY(ROOMID1));
CREATE TABLE BOOKING (
BOOKINGID NUMBER(4) NOT NULL ,
DAYOFWEEK CHAR(15) NOT NULL,
TIMEOFDAY CHAR(8) NOT NULL,
DURATION VARCHAR2(20)NOT NULL,
UNITCODE NUMBER(8)NOT NULL,
ROOMID NUMBER(4) NOT NULL,
CONSTRAINT BOOKINGPK PRIMARY KEY(BOOKINGID),
CONSTRAINT LABFK FOREIGN KEY(ROOMID)
REFERENCES LAB(ROOMID)
ON UPDATE NO ACTION
ON DELETE NO ACTION
);
LAB4
, but you are referencingLAB
. – GolezTrol