CREATE TABLE Existing_medical_condition (
condition VARCHAR(50) NOT NULL,
date_of_diagnosis DATE, treatment TEXT,
pssn INT NOT NULL,
CONSTRAINT emc_key PRIMARY KEY(condition, pssn),
FOREIGN KEY(pssn) REFERENCES Patient(ssn)
);
給出錯誤:語法有什麼問題?
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 'condition VARCHAR(50) NOT NULL, date_of_diagnosis DATE, treatment TEXT, pssn INT' at line 1
如果以下任何答案有幫助,請考慮接受他們作爲答案。 – Kermit 2013-04-23 00:45:10