mysql-MYSQL连续左连接两张表报错
程序员文章站
2022-05-30 13:33:51
...
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