random随机函数

SQL> select * from (select ename,job from emp order by dbms_random.value() ) where  rownum <5

  2  ;



ENAME	   JOB

---------- ---------

WARD	   SALESMAN

JAMES	   CLERK

BLAKE	   MANAGER

KING	   PRESIDENT



SQL> /



ENAME	   JOB

---------- ---------

TURNER	   SALESMAN

CLARK	   MANAGER

SMITH	   CLERK

WARD	   SALESMAN



SQL> /



ENAME	   JOB

---------- ---------

SCOTT	   ANALYST

KING	   PRESIDENT

SMITH	   CLERK

CLARK	   MANAGER



SQL> /



ENAME	   JOB

---------- ---------

SCOTT	   ANALYST

JAMES	   CLERK

JONES	   MANAGER

SMITH	   CLERK

你可能感兴趣的:(Random)