Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

1

主题
1#
发表于 2016-9-23 17:17:01 | 查看: 2149| 回复: 0
本帖最后由 wq573983087 于 2016-9-23 17:46 编辑

问题描述:
有五条sql分别如下:
sql1: select max(id) from (select t1.id from t1 left join t2 on t1.col = t2.col and (t2.name = 'A' or t2.name = 'B') group by t1.id )
sql2: select id from (select t1.id from t1 left join t2 on t1.col = t2.col and (t2.name = 'A' or t2.name = 'B') group by t1.id)
sql3: select max(id) from (select t1.id from t1 left join t2 on t1.col = t2.col and (t2.name = 'A') group by t1.id)
sql4: select max(id) from (select t1.id from t1 left join t2 on t1.col = t2.col and (t2.name = 'A' or t2.name = 'B'))
sql5: select max(id) from (select t1.id from t1 inner join t2 on t1.col = t2.col and (t2.name = 'A' or t2.name = 'B') group by t1.id )
其中t1,t2表是dblink远程连接的表

执行结果sql2,sql3,sql4正确执行,sql1报ora-00907: missing right parenthesis ora-02063: preceding line from DBLink_name

oracle 版本都为ora10G

我们同事说在测试库测试过这条sql了,是没有问题的,但是在服务器出错了

多谢大家啦
您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-20 16:34 , Processed in 0.093079 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569