1. 隨機數包
select dbms_random.value
from dual;
2. 在[0..100]範圍內取隨機數
select trunc (dbms_random.value (0, 100))
from dual;
3. 大於字元『a』的10個字元隨機字串
select dbms_random.string ('a', 10)
from dual;
4. 單個小寫隨機字元
select chr (round (dbms_random.value (97, 122)))
from dual;
5. 在過去10天內取隨機日期
select to_date (trunc (dbms_random.value (to_number (to_char (sysdate - 10,
'j')
),to_number (to_char (sysdate, 'j')))),
'j')
from dual;
6. 在過去30分鐘內取隨機時間
select (sysdate - 1 / 24 / 60 * 30) + dbms_random.value (1, 1800) / 3600 / 24
from dual;
Oracle生成隨機數
38 位精度的隨機數 例如 2080.540270297243047172097413955732485122 selectdbms random value 1,9999 fromdual 四位數,取整 selecttrunc dbms random value 1000 9999 fromdua...
隨機生成隨機數
現畫乙個command命令按鈕,進行貼上。private sub command1 click show me scale 0,0 18,8 me.auto redraw true me.draw mode 2 circle 3,4 3,vb red me.auto redraw false lin...
oracle生成隨機數函式
create or replace function createuniquekey str begin in varchar2,str date in varchar2,date date in date str date format in varchar2,bool is timestamp ...