0
我想在SQL
創建一個臨時表,但有一個我無法識別的錯誤。有人可以幫我看看這個SQL查詢
CREATE TEMPORARY TABLE Guest(ID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
ticket_id NOT NULL VARCHAR(255),
event_id NOT NULL INT (11),
user_id NOT NULL INT (11),
fullname NOT NULL VARCHAR(255),
delivery NOT NULL VARCHAR(255),
ticket_type NOT NULL VARCHAR(255),
ticket_price NOT NULL DECIMAL(19,4),
fees NOT NULL DECIMAL(19,4),
total_price NOT NULL DECIMAL(19,4),
barcode NOT NULL VARCHAR(255),
purchase_time NOT NULL datatime,
person_pickup NOT NULL varchar(80),
Qty NOT NULL INT(11));
以下是錯誤消息:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to usenear 'NOT NULL VARCHAR(255),event_id NOT NULL INT (11),user_id NOTNULL INT (11),fulln' at line 1
嘗試刪除INT和(11)之間的空格,用於event_id和user_id –
@LelioFaieta不起作用 –