读书人

oracle dba的练习题 恢复数据 with as

发布时间: 2012-07-16 15:44:59 作者: rapoo

oracle dba的练习 恢复数据 with as去重

http://blog.sina.com.cn/s/articlelist_2120624970_0_1.htmlhttp://blog.csdn.net/fw0124/article/details/6210730恢复数据select * from table as of timestamp to_date('2011-01-19 15:28:00', 'yyyy-mm-dd hh24:mi:ss')    SQL> with employee_avg_salary as (        2  select employee_id, avg(salary) avg_salary from salary        3  group by employee_id)        4  select * from employee_avg_salary t        5  where t.avg_salary>(select avg(avg_salary)    from employee_avg_salary)        6  /           EMPLOYEE_ID   AVG_SALARY      -----------  ------------           1             8500           2             6800 

读书人网 >其他数据库

热点推荐