SQL> select * from v$version;
BANNER CON_ID
---------------------------------------------------------------------------- ------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 0
PL/SQL Release 12.1.0.2.0 - Production 0
CORE 12.1.0.2.0 Production 0
TNS for Linux: Version 12.1.0.2.0 - Production 0
NLSRTL Version 12.1.0.2.0 - Production 0
SQL> select Val
2 from (select mod(dbms_random.random(),123) as Val
3 from dict)
4 where Val >= 25
5 and RowNum <= 5;
VAL
---
29
118
104
64
39
OK I Will Use Oracle12C New Feature "Fetch First"
SQL> select Val
2 from (select mod(dbms_random.random(),123) as Val
3 from dict)
4 where Val >= 25
5 Fetch First 5 rows Only;
VAL
----
-6
-83
-77
-108
-17
My Question is Why Above Query Returns not more than 25 Vals ???
If Query does not have RandValue,It works correct.
SQL> select Val
2 from (select column_value as Val
3 from table(sys.OdciNumberList(1,2,3,4,5,30,31,32,33,34,35)))
4 where Val >= 25
5 Fetch First 5 rows Only;
VAL
---
30
31
32
33
34