mybatis查询oracle ’无效的列索引‘和ORA-00911’无效的字符‘错误
时间:2015-03-02 20:35:27
收藏:0
阅读:9075
1、Caused by: java.sql.SQLException: 无效的列索引
参考文献:http://bbs.csdn.net/topics/300179772
配置的sql语句写错了
select distinct ‘#{pkgName}‘ as pkgName, ‘#{appName}‘ as appName, version as versionName from stat_dim_version where appkey=#{appKey} order by version desc
使用了#{**}后就不用再加单引号了。改正为
select distinct #{pkgName} as pkgName, #{appName} as appName, version as versionName from stat_dim_version where appkey=#{appKey} order by version desc
2、ORA-00911’无效的字符‘错误
参考文档:http://www.cnblogs.com/zhangronghua/archive/2007/08/29/874484.html
oracle配置的语句后面不要加分号,这个在mysql中没有出现问题,在oracle的语句中不通。
评论(0)