JDBC executeUpdate() 执行这个 MySqlQuery:
CREATE TABLE IF NOT EXISTS TaskLog
(TaskID int NOT NULL AUTO_INCREMENT,
NoOfLock int NOT NULL,
LastAcquired varchar(50) NOT NULL,PRIMARY KEY(TaskID))
它给了我这个:
SQLException: 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 'PRIMARY KEY(TaskID))' at line 1
我尝试在 PhpMyAdmin 中执行它,它有效!所以我不明白为什么通过java代码执行时它不起作用