我在运行此sql语句时遇到问题.如果我在mysql中运行它,它工作正常,但在java中我得到此错误:
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 '' at line 1
Run Code Online (Sandbox Code Playgroud)
数据库有一个id(pk)autogenerated,varchar,int,varchar;
有人能帮我吗?
int i = statement.executeUpdate("INSERT INTO sala values('','"+ nume.getText() + "', "+ Integer.parseInt(capacitate.getText())+ ", '" + sunet.getText()+"'");
Run Code Online (Sandbox Code Playgroud)