高级查询 随机返回5条记录 select * from (select ename,job from emp order by dbms_random.value())where rownum<=5; 处理空值排序 select * from emp order by comm desc nulls last(first); 查询跳过表中的偶数行 select ename from (select row_number() over (order by name) rn,ename from e…
--20170322 --1.0 --更新表的统计信息begin dbms_stats.set_table_stats(user,'EMP',numrows => 10000);end; begin dbms_stats.set_table_stats(user,'DEPT',numrows => 10000);end; --重新查看表的统计信息select t.table_name,t.num_rows,t.blocks from user_tables t where t.table_na…