Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Simulate Rolling Dice: Random Number between 1 and 6

ryoung01Mar 19 2013 — edited Mar 20 2013
All,

Can anyone help me figure out how to BEST build a random number generator that creates INTEGER values between 1 and 6 (like a die)?

DBMS_RANDOM seems to create decimals, even when used as DBMS_RANDOM.VALUE(1,6). Also, I would never get 6 with this.

Any help would be GREATLY appreciated!!

Thanks,

Rick
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2013
Added on Mar 19 2013
4 comments
1,387 views