dbms_random.value就是生成随机数

解决方案 »

  1.   

    dbms_random.value返回一个随机数
    select col1,col2,col3 from tb order by 1;
    相当于
    select col1,col2,col3 from tb order by col1;select col1,col2,col3 from tb order by 2;
    相当于
    select col1,col2,col3 from tb order by col2;...
      

  2.   

    while()是循环 if 只是判断resultSet 包含了一行数据。
      

  3.   

    dbms_random.value会产生一个[0,1)的随机数,不可以放在order by后面啊
      

  4.   

    另外产生的随机数是伪随机数,同一个用户重复刷新页面的时候得到的是同样的结果。不使用存储过程而直接调用sql有方法实现吗?