CREATE TABLE ADMIN (
A_EMP_ID CHAR 5 BYTE NOT NULL,
ADMIN_START_DATE DATE DEFAULT SYSDATE NOT NULL,
ADMIN_END_DATE DATE NULL,
DIVERSITY_TRAINING_CERT CHAR(1 BYTE) DEFAULT 'N' NOT NULL,
ADMIN_TITLE CHAR(40 BYTE) NULL,
CONSTRAINT ADMIN_PK PRIMARY KEY(A_EMP_ID),
CONSTRAINT ADMIN_FK1
FOREIGN KEY(A_EMP_ID)
REFERENCES ADMIN(A_EMP_ID),
CONSTRAINT ADMIN_DIVERSITY_CERT
CHECK (DIVERSITY_TRAINING_CERT = 'N','Y'),
CONSTRAINT ADMIN_END_DATE
CHECK (<= 'ADMIN_START_DATE'),
);
Error starting at line : 1 in command -
CREATE TABLE ADMIN (
A_EMP_ID CHAR 5 BYTE NOT NULL,
ADMIN_START_DATE DATE DEFAULT SYSDATE NOT NULL,
ADMIN_END_DATE DATE NULL,
DIVERSITY_TRAINING_CERT CHAR(1 BYTE) DEFAULT 'N' NOT NULL,
ADMIN_TITLE CHAR(40 BYTE) NULL,
CONSTRAINT ADMIN_PK PRIMARY KEY(A_EMP_ID),
CONSTRAINT ADMIN_FK1
FOREIGN KEY(A_EMP_ID)
REFERENCES ADMIN(A_EMP_ID),
CONSTRAINT ADMIN_DIVERSITY_CERT
CHECK (DIVERSITY_TRAINING_CERT = 'N','Y'),
CONSTRAINT ADMIN_END_DATE
CHECK (<= 'ADMIN_START_DATE'),
)
Error report -
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:
The top part is my code and when I run it, I get the message from the bottom half. I'm thinking it's something to do with my foreign key, but I don't know what the exact solution is. Any help is greatly appreciated.