oracle中的sql语句问题(急!!!!!!!!!)

wuxiaochun 2006-07-12 07:32:51
在oracle9i中:
select * from a left join b on a.id=b.id and a.code=b.code
在oracle9i以下的版本中改为:
select * from a,b where a.id(+)=b.id,a.code(+)=b.code 还是
select * from a,b where a.id=b.id(+),a.code=b.code(+)哪个是正确的.
(+)是不是决定你是以哪个为主表啊?

...全文
213 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiekong 2006-07-13
  • 打赏
  • 举报
回复
(+)是使到外连接上你有的得是内联
qiekong 2006-07-13
  • 打赏
  • 举报
回复
你测试一下数据不就知道了么
czbbbs 2006-07-13
  • 打赏
  • 举报
回复
select * from a,b
where a.id=b.id(+) and a.code=b.code(+)是正确的.

, == and
xiaoxiao1984 2006-07-13
  • 打赏
  • 举报
回复
select * from a,b where a.id=b.id(+),a.code=b.code(+)

主表字段后不用(+),从表字段后加上(+)
qyflaoda 2006-07-12
  • 打赏
  • 举报
回复
left join 右边的用+号
sasacat 2006-07-12
  • 打赏
  • 举报
回复
select * from a,b where a.id=b.id(+),a.code=b.code(+)是对的
(+)跟在从表的后面

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧