我正在用Java编写这个程序,我正在尝试执行此查询但是存在语法错误。任何人都可以告诉问题在哪里?感谢
int initial;
int last;
this.initial=initial;
this.last = limit;
resultSet = statement.executeQuery("select * from weibo_olympics Limit '"+initial+"','"+last+"';");
答案 0 :(得分:1)
请试试这个:
int initial;
int last;
this.initial=initial;
this.last = limit;
resultSet = statement.executeQuery("select * from weibo_olympics Limit "+initial+","+last);
希望这个帮助