随机获取一条数据

select id_credit, contract_no
  from (select *
          from welcome_share s
         where s.status = 0
           and s.dial_num < 3
           and s.owner = 'CE'
           and s.userid is null
         order by s.dial_level,
                  s.app_date,
dbms_random.value, --随机获取 decode(s.source,
'ONLINE_ST', 0, 1) asc) where rownum = 1
原文地址:https://www.cnblogs.com/2333hh/p/5627473.html