ahuwangqun 2016-03-28 10:29 采纳率: 18.5%
浏览 2079

MYSQL连续左连接两张表报错

SQL语句如下:
SELECT * FROM
channel AS a JOIN floors b ON a.ifloorid = b.id
join floors c on a.ofloorid = c.id
连续连接同一张表。
这个SQL语句直接放在mysql终端执行是没有问题的。
但是当用jdbc运行的时候。提示错误:
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 ''floors' b ON a.ifloorid = b.id JOIN 'floors' c ON a???ofloorid = c.id' at line 1

数据库版本是5.5,mysql的jar版本是5.1.6

  • 写回答

3条回答

  • Java__Coder 2016-03-28 11:16
    关注

    a???ofloorid = c.id....

    评论

报告相同问题?

悬赏问题

  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元