Oracle/sql query

Advertisement


Question
I want to know that how to use flash back query if anybook

please tell me I want to rollback The DDL commands.

Answer
---Examples of FlashBack

create table test_flashback
(ab number(2));

insert into test_flashback
select substr(dman_cd_dim_ano,1,2) from dm_ano;

delete from test_flashback;

commit;

insert into test_flashback select * from test_flashback as of timestamp(sysdate - ((1/24)/60));

commit;

---------------------------------

drop table test_flashback;

flashback table test_flashback to before drop;



----Real example

select count(*) from (
select * from test_flashback as of timestamp(sysdate - ((10/24)/60))
  ) a

Wait your reply

Oracle

All Answers


Answers by Expert:


Ask Experts

Volunteer


Edson

Expertise

I can answer questions about Sql (including Sql tuning), pl/Sql and a bit of oracle administration

Experience

I work as a consultant in Brazil and I face problems of all kind in oracle every day development.

Education/Credentials
INFNET, Oracle Database SQL expert

©2012 About.com, a part of The New York Times Company. All rights reserved.