数据库恢复语句

  **  闪回

查询某一时间点的数据
select * from gs_grid_info  as of timestamp to_timestamp('2013-05-09 9:00:47', 'yyyy-mm-dd hh24:mi:ss');
 
允许数据表行移动
 alter table gs_grid_relation enable row movement;
恢复到指定时间的表记录
 flashback table gs_grid_relation to timestamp to_timestamp('2013-05-09 10:00:00','yyyy-mm-dd hh24:mi:ss');
 ** 差异
   select  * from B minus select * from A;
    比较表结构相同的两表之间的差异用minus。

    select  * from gs_grid_info minus 
    select *  from gs_grid_info  as of timestamp to_timestamp('2013-05-09 9:00:47', 'yyyy-mm-dd hh24:mi:ss');

猜你喜欢

转载自wfzhanga.iteye.com/blog/1865716