随机获取一条数据

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

 

posted @ 2016-06-29 16:53  小爆脾气  阅读(239)  评论(0编辑  收藏  举报