@JFinal,请教下:
执行脚本:
drop table if exists tag_details_5;
create table tag_details_5
(
id bigint(20) not null auto_increment comment 'ID',
credit_name varchar(200) comment '信用称谓(表彰名称/提示事项名称/警示事项名称)',
tab_value varchar(2) comment '标签取值',
org_id bigint(20) comment '组织机构编号',
sts char(1) comment '状态',
primary key (id)
)
ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
alter table tag_details_5 comment 'tag_details_5';
执行过程中报错
Exception in thread "main" com.jfinal.plugin.activerecord.ActiveRecordException: 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 'create table tag_details_5
(
id int(11) not null auto_increment comment 'ID'' at line 2
at com.jfinal.plugin.activerecord.DbPro.update(DbPro.java:283)
at com.jfinal.plugin.activerecord.DbPro.update(DbPro.java:294)
at io.indicator.auto.ExecuteScriptTask.main(ExecuteScriptTask.java:32)
Caused by: 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 'create table tag_details_5
(
id int(11) not null auto_increment comment 'ID'' at line 2
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2683)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2144)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2444)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2362)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2347)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:410)
at com.jfinal.plugin.activerecord.DbPro.update(DbPro.java:264)
at com.jfinal.plugin.activerecord.DbPro.update(DbPro.java:281)
... 2 more