首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有没有可能获得dbms_random.random的源代码?

问有没有可能获得dbms_random.random的源代码?
EN

Stack Overflow用户
提问于 2020-04-30 01:38:32
回答 2查看 58关注 0票数 0

有没有可能获得dbms_random.random的源代码?或者至少知道它是怎么做到的?

例如,一种方法是

代码语言:javascript
复制
  randomValue = RandSeed * $08088405 + 1
  RandSeed = randomValue 

但是dbms_random.value是怎么做到的呢?

EN

回答 2

Stack Overflow用户

发布于 2020-04-30 01:45:06

是;搜索dbmsrand.sql。在我的Oracle 11g XE上,它位于

代码语言:javascript
复制
C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmsrand.sql
票数 2
EN

Stack Overflow用户

发布于 2020-04-30 03:42:39

plsql源代码在Oracle数据库中可用。

阅读包装规格-

代码语言:javascript
复制
------------
    --  OVERVIEW
    --
    --  This package should be installed as SYS.  It generates a sequence of
    --  random 38-digit Oracle numbers.  The expected length of the sequence
    --  is about power(10,28), which is hopefully long enough.
    --
    --------
    --  USAGE
    --
    --  This is a random number generator.  Do not use for cryptography.
    --  For more options the cryptographic toolkit should be used.
    --
    --  By default, the package is initialized with the current user
    --  name, current time down to the second, and the current session.
    --
    --  If this package is seeded twice with the same seed, then accessed
    --  in the same way, it will produce the same results in both cases.
    --
    --------

​

​

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61508076

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档