“Column check constraint cannot reference other columns”


CREATE TABLE SALES_ORDER ( S_ORDER_NO VARCHAR2(6) PRIMARY KEY CHECK (S_ORDER_NO LIKE ‘O’), S_ORDER_DATE DATE, DELY_ADDR VARCHAR2(25), SALESMAN_NO VARCHAR2(6) REFERENCES SALESMAN_MASTER(SALESMAN_NO), DELY_TYPE CHAT(1) DEFAULT ‘F’ CHECK (DELY_TYPE IN (‘P’, ‘F’)), BILLED_YN CHAT(1), DELY_DATE DATE CHECK (DELY_DATE > S_ORDER_DATE), ORDER_STATUS VARCHAR2(10) CHECK (ORDER_STATUS IN (‘PROCESS’,’FULFILLED’, ‘BLOCKORDER’,’CANCELED’)));