SQL> delete from test10 where id is null;
已删除 1 行。
SQL> commit;
提交完成。
SQL> select *
from (select /*+ index_desc(test10 test10_idx1) */
id
from test10
where rownum < 2) a1,
(select /*+ index_asc(test10 test10_idx1)*/
id
from test10
where rownum < 2) a2; 2 3 4 5 6 7 8 9
ID ID
---------- ----------
1 1
SQL> ALTER TABLE TEST10 MODIFY ID NOT NULL;
表已更改。
SQL> select *
from (select /*+ index_desc(test10 test10_idx1) */
id
from test10
where rownum < 2) a1,
(select /*+ index_asc(test10 test10_idx1)*/
id
from test10
where rownum < 2) a2; 2 3 4 5 6 7 8 9
ID ID
---------- ----------
100000 1