摘要:
CREATE OR REPLACE PACKAGE BODY SYS.dbms_random AS mem num_array; -- big internal state hidden from the user counter BINARY_INTEGER := 55;-- counter through the results saved_norm NUMBER := NULL; -- un... 阅读全文
摘要:
方法1:select gmsfhm, xmfrom ( select gmsfhm, xm from czrk where gmsfhm like '%%' order by dbms_random.value )where rownum <= 100方法2:select gmsfhm, xm from ( select gmsfhm,xm fromczrk wheregmsfhm like... 阅读全文
摘要:
这两天发了一个贴子,寻找比较好的办法随机取出表的一条记录地址见:http://www.oracle.com.cn/viewthread.php?tid=20848本文介绍了一下ORACLE SAMPLE语法的应用,采用SAMPLE也是一种解决方法,不过还不是很好,主要是返回的记录分布不均匀,要么是靠表前面的一些,要么是不返回记录。下面是SAMPLE语法的使用示例:选择10%的记录select * ... 阅读全文