借助sys_guid()函数,8I以后引进的
[php]
SQL> select * from student;
STUDENT SUBJECT GRADE
---------------------------------------- -------------------- ----------
student1 语文 80
student1 数学 70
student1 英语 60
student2 语文 90
student2 数学 80
student2 英语 100
student3 语文 78
student4 语文 79
student3 英语 78
student4 英语 98
student3 数学 88
STUDENT SUBJECT GRADE
---------------------------------------- -------------------- ----------
student4 数学 68
12 rows selected.
SQL> select * from (select * from student order by sys_guid()) where rownum<5;
STUDENT SUBJECT GRADE
---------------------------------------- -------------------- ----------
student2 数学 80
student3 英语 78
student1 数学 70
student1 英语 60
SQL> select * from (select * from student order by sys_guid()) where rownum<5;
STUDENT SUBJECT GRADE
---------------------------------------- -------------------- ----------
student2 数学 80
student4 数学 68
student4 英语 98
student1 语文 80
SQL> select * from (select * from student order by sys_guid()) where rownum<5;
STUDENT SUBJECT GRADE
---------------------------------------- -------------------- ----------
student4 数学 68
student3 英语 78
student3 语文 78
student1 语文 80
SQL>
[/php]