小弟是oracle菜鸟!
在获去某个view的某一行的数据时利用minus
select * from view1 where rownum <= 13 minus select * from view1 where rownum <=12;
不能得到值,而使用 select * from view1 where rownum <= 13时却可以看到有13行的值,
不知怎么回事?
有其他方法获取某行的值吗?
在获去某个view的某一行的数据时利用minus
select * from view1 where rownum <= 13 minus select * from view1 where rownum <=12;
不能得到值,而使用 select * from view1 where rownum <= 13时却可以看到有13行的值,
不知怎么回事?
有其他方法获取某行的值吗?
where rn=13
你的不能显示行,有可能查询出重复列!自己看一哈!
select * from my_table where rownum<=3 minus select * from my_table where rownum<=2; NO VALUE
---------- --------------------
2 c
你看看是不是视图有问题啊
不知怎么回事?
select * from (select rownum id,a.* from view1 a where rownum <= 13)where id >=12
除最后 id>12 外~ 其它都是copy from sasacat 的~ 呵呵.
select * from (select rownum as id,view1.* from view < where rownum <= 13) where id = 13
可以实现功能,请问有没有更高效的方法?
这条语句应该很有效率了,至少比用minus快而且准确