mysql> CREATE TABLE EMPLOYEE_PAY_TBL
-> (
-> EMP_ID VARCHAR(9) NOT NULL PRIMARY KEY,
-> POSITION VARCHAR(15) NOT NULL,
-> DATE_HIRE DATE,
-> PAY_RATE DECIMAL(4,2),
-> DATE_LAST_RAISE DATE,
-> SALARY DECIMAL(8,2),
-> BONUS DECIMAL(6,2),
-> CONSTRAINT EMP_FK FOREIGN KEY (EMP_ID) REFERENCES EMPLOYEE_TBL (EMP_ID)
-> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY,
POSITION VARCHAR(15) NOT NULL,
DATE_HIRE DATE,
PAY_RATE DECIMAL(4,2),
DAT' at line 3
精慕HU
相关分类