当前位置:Gxlcms > mysql > mysql-MYSQL连续左连接两张表报错

mysql-MYSQL连续左连接两张表报错

时间:2021-07-01 10:21:17 帮助过:33人阅读

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

人气教程排行