【参考文章】:java.sql.SQLSyntaxErrorException: ORA-00909: 参数个数无效
【参考文章】:Oracle Concat()函数
【参考文章】:MySQL concat()函数
在 left join ... on ...后面添加逗号(,)或者去掉逗号(,)
Oracle两个左连接语句,一个需要加逗号,一个需要去掉逗号,我也不知道为啥
select xxx from tableA left join xxx on xxx , where xxx;
Oracle 有一个隐藏的字段是 rownum,表示当前记录是第几行
MySQL:select xxx from table limit n
Oracle:select xxx from table where xxx=xxx and rownum=n;
select COUNT(*) from base_vehicle_info where 1=1 and org_id IN (SELECT org_id FROM base_organization
WHERE id_level LIKE CONCAT(‘%/‘,#{orgId},‘/%‘) and del_flag = 0
mysql 的 concat可连接一个或者多个字符串;
oracle 的 concat 只能连接两个字符串,超过两个的时候需要嵌套使用;
select COUNT(*) from base_vehicle_info where 1=1 and org_id IN (SELECT org_id FROM base_organization
WHERE id_level LIKE concat(concat(‘%‘, 1584), ‘%‘))and del_flag = 0
去掉查询语句后面的分号
原文:https://www.cnblogs.com/virgosnail/p/12739243.html