AllExperts > Oracle 
Search      
Oracle
Volunteer
Answers to thousands of questions
 Home · More Oracle Questions · Answer Library  · Encyclopedia ·
More Oracle Answers
Question Library

Ask a question about Oracle
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Binosh Mullassery-Padman
Expertise
I can answer any questions on Oracle SQL and PL/SQL. The following are the topics I am an expert in Writing SQL using SQL 92 standards Oracle Advanced Groups Analytical Functions Hierarchial Queries Partition Objects and Collections Oracle XML Oracle regular Expressions Exception Handling Bulk Binding Dynamic SQL and PL/Sql Procedures Functions Packages Triggers Advanced Queueing Implicit and Explicit Cursors Oracle sql functions(CAST, CURSOR etc) Oracle SQL Tuning Oracle Execution Plans

Experience
10 Years as Developer and DBA

Organizations
Currently working with a Health Care industry

Education/Credentials
Masters in Computer Applications

 
   

You are here:  Experts > Computing/Technology > Oracle > Oracle > sql query

Oracle - sql query


Expert: Binosh Mullassery-Padman - 9/26/2009

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
Hi Sandeep,

  Good to see you again. How are you doing?

  I believe your requirement is to restore a table if you have dropped that table.


  Let me walk you thru an example.

  Let's say you have dropped EMP table. This table will be dropped from the data dictionay and
  stored in a table called recyclebin. Recyclebin in Oracle is exactly like WINDOWS OS
  recyclebin. All the deleted objects will go and store here. And you can query recyclebin
  using the following sql

    select * from recyclebin;

will show you the dropped EMP table. Here original_name shows the name of the object you
dropped and object_name will show the name of the object in the recyclebin table.

You can retrieve this table by issuing the following command.

    flashback table emp to before drop;

This command will restore the EMP table from recyclebin and delete this from recyclebin after
it has been successfully restored.

Hope this helps.

I will be glad to help you out if you need anymore assistance on this subject.

Thanks,
Binosh


Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.