--随机排序
SELECT *
FROM (select level from dual connect by level<10)
ORDER BY DBMS_RANDOM.VALUE
--order by的数字比列数大:
SELECT *
FROM (select level from dual connect by level<10)
ORDER BY 2
ORA-01785:ORDER BY ITEM MUST BE THE NUMBER OF A SELECT-LIST EXPRESSION
--随机排序union
select level L from dual connect by level<10
UNION
SELECT L
FROM (select level L from dual connect by level<10)
ORDER BY DBMS_RANDOM.VALUE
--ORA=03113:通信通道的文件结尾 进程ID:0 会话ID: 130 序列号:465
--此时客户端失去会话连接,需要重新连接
--一般排序union
select level L from dual connect by level<10
UNION
SELECT L
FROM (select level L from dual connect by level<10)
ORDER BY 1
--正常
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25323853/viewspace-714781/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25323853/viewspace-714781/