当我运行此代码时出错,
SQL错误:ORA-00905:缺少关键字 00905. 00000 - “缺少关键字”
*原因:
*动作:在ORACLE上运行它。不知道如何解决它。
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
);