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....

    评论

报告相同问题?

悬赏问题

  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码