每次尝试执行查询时,我都会收到此错误。我多次检查任何语法错误,但我找不到任何语法错误。
Msg 142, Level 15, State 2, Line 0
Incorrect syntax for definition of the 'TABLE' constraint.
CREATE TABLE "hold" (
timePutOnHold TIME(7),
customer_id VARCHAR(13),REFERENCES "Customer",
isbn VARCHAR(13) REFERENCES "Item_Details",
PRIMARY KEY (customer_id, isbn, timePutOnHold)
)
解决了!我必须在 customer_id VARCHAR(13) 之后删除逗号