oraclesql精华收集(精良版).docVIP

  • 1
  • 0
  • 约 16页
  • 2017-06-12 发布于北京
  • 举报
SQL精华收集 order by 的数值型灵活使用 select * from table_a where id=p_id order by decode(函数,asc,1,desc,-1)*jsny; 控制试图的访问时间: 6.create view ... as select ... from where exists(select x from dual where sysdate=8:00am and sysdate=5:00pm) 妙用decode实现排序 select * from tabname order by decode(mode,FIFO,1,-1)*to_char(rq,yyyymmddhh24miss); select * from tabname order by decode(mode,FIFO,rq-sysdate, sysdate-rq) 找出某个时期内工作日数: select count(*) from ( select rownum-1 rnum from all_objects where rownum = to_date(2002-02-28,yyyy-mm-dd) - to_date(2002- 02-01,yyyy-mm-dd)+1 ) where to_char( to_date(2002

文档评论(0)

1亿VIP精品文档

相关文档