sql语句有错

q5661889 2011-05-18 01:14:45
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 'order by SdTime DESC' at line 1

我的sql语句为 sql = "select * from tb_article limit 0,3 order by SdTime DESC";
执行ResultSet rs = connection.executeQuery(sql);
...全文
37 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wl_ldy 2011-05-18
  • 打赏
  • 举报
回复
sql = "select * from tb_article limit 0,3 order by SdTime DESC";
改为:
sql = "select * from tb_article order by SdTime DESC limit 0,3";

58,452

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧