PLSQL generate random integer

后端 未结 6 1176
离开以前
离开以前 2021-02-08 11:53

In Oracle Sql developer 11g, how do I generate a random integer and assign it to a variable? This is what I\'ve tried so far:

S_TB := SELECT dbms_random.value(1,         


        
6条回答
  •  失恋的感觉
    2021-02-08 12:43

    Integers:

    select dbms_random.random from dual
    

    Positive integers:

    select abs(dbms_random.random) from dual
    

提交回复
热议问题