CREATE TABLE STUDENT (
ST_ID NUMBER(2) PRIMARY KEY NOT NULL,
S_ID NUMBER(2) NOT NULL,
ST_FULL_NAME CHAR(25),
ST_GENDER CHAR(1) NOT NULL,
ST_AGE NUMBER(2),
ST_EMAIL VARCHAR(20) CHECK(ST_EMAIL LIKE ‘%@%’),
ST_GDATE DATE,
FOREIGN KEY (S_ID) REFERENCES STAFF,
CONSTRAINT STUDENT_CK_ST_GENDER CHECK (ST_GENDER IN ('M','F')),
CONSTRAINT STUDENT_CK_ST_GDATE CHECK (ST_GDATE > 01-JAN-2014)); --<-- constraint
我被困在最后一个约束上。每次我收到一条消息说“JAN”无效的标识符。
有人可以找出错误并为我纠正错误吗?
答案 0 :(得分:4)
CONSTRAINT STUDENT_CK_ST_GDATE CHECK (ST_GDATE > TO_DATE('20140101','YYYYMMDD'))