com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

时间:2023-02-11 20:32:15
 1 Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '(3),    primary key (ID_)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin' at line 1
 2     at sun.reflect.GeneratedConstructorAccessor4.newInstance(Unknown Source)
 3     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 4     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 5     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 6     at com.mysql.jdbc.Util.getInstance(Util.java:381)
 7     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031)
 8     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
 9     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
10     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
11     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
12     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
13     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)
14     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)
15     at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:998)
16     at com.to.init.InitSQL.main(InitSQL.java:55)