`
032615
  • 浏览: 59990 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

first_rows为什么影响decode

阅读更多

表A有字段id

select /*+ first_rows*/  表A.id   from 表A

 where id= decode('', '', id, '')

照道理应该输出表A的所有记录,实际上一条都没输出(没查到记录)

但是如果改为如下sql

select  表A.id   from 表A

 where id= decode('', '', id, '')

则输出所有记录

first_rows影响decode函数吗?为什么?
  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics