NULL值会影响SQL查询结果

来源:互联网 发布:55开的淘宝店地址 编辑:程序博客网 时间:2024/05/22 10:40
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    1SQL>   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

0 0
原创粉丝点击