2015年3月25日
摘要: explain plan for select * from scott.emp; select * from table(dbms_xplan.display) --要配合 explain 使用--查询最近执行过的sql 的执行计划,在sqlplus 在执行 前提是目标sql 还有shared ... 阅读全文
posted @ 2015-03-25 16:25 相约future 阅读(267) 评论(0) 推荐(0) 编辑
摘要: --Oracle trunc()函数的用法/**************日期********************/select trunc(sysdate) from dual --2015-03-23 今天的日期为2015-03-23select trunc(sysdate, 'mm')... 阅读全文
posted @ 2015-03-25 16:20 相约future 阅读(908) 评论(0) 推荐(0) 编辑
摘要: --取随机的数据select empno,ename from ( select a.*,rownum rn from emp a order by dbms_random.value ) where rn=3000 then 1 else 2 end as rn from emp order by... 阅读全文
posted @ 2015-03-25 16:19 相约future 阅读(121) 评论(0) 推荐(0) 编辑