Home » SQL & PL/SQL » SQL & PL/SQL » How to Undo a drop table operation? (11g)
How to Undo a drop table operation? [message #578086] Sun, 24 February 2013 07:14 Go to next message
ashishpatel1992
Messages: 38
Registered: February 2013
Location: India
Member
How do I perform Undo a drop table operation?
Re: How to Undo a drop table operation? [message #578090 is a reply to message #578086] Sun, 24 February 2013 07:36 Go to previous messageGo to next message
dariyoosh
Messages: 530
Registered: March 2009
Location: Iran / France
Senior Member
Are you sure that you searched the online documentation before asking the question on the forum?

http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9012.htm#i2172752

Regards,
Dariyoosh
Re: How to Undo a drop table operation? [message #578091 is a reply to message #578090] Sun, 24 February 2013 07:40 Go to previous messageGo to next message
ashishpatel1992
Messages: 38
Registered: February 2013
Location: India
Member
Yes, I have seen but I didnt understood how to use it.
For example I have dropped table emp.
drop table emp

Then if i tried following but nothing works except gives me error
SQL> flashback;
flashback
        *
ERROR at line 1:
ORA-00905: missing keyword


SQL> flashback emp;
flashback emp
          *
ERROR at line 1:
ORA-00905: missing keyword


SQL> flashback table
  2  ;

*
ERROR at line 2:
ORA-00921: unexpected end of SQL command


SQL> flashback table emp;
flashback table emp
                  *
ERROR at line 1:
ORA-00921: unexpected end of SQL command


I am unable to understand the documentation. Can you please explain me better?
Regards,
Ashish
Re: How to Undo a drop table operation? [message #578092 is a reply to message #578091] Sun, 24 February 2013 07:44 Go to previous messageGo to next message
dariyoosh
Messages: 530
Registered: March 2009
Location: Iran / France
Senior Member
ashishpatel1992 wrote on Sun, 24 February 2013 14:40
I am unable to understand the documentation. Can you please explain me better?
Regards, Ashish


All you need to do is just follow the syntax indicated in the same page of the documentation
http://docs.oracle.com/cd/E11882_01/server.112/e26088/img_text/flashback_table.htm


Regards,
Dariyoosh
Re: How to Undo a drop table operation? [message #578093 is a reply to message #578092] Sun, 24 February 2013 07:46 Go to previous messageGo to next message
ashishpatel1992
Messages: 38
Registered: February 2013
Location: India
Member
I am beginner at SQL I don't know advance concepts yet.
Can you write a simple query how can i undo table drop operation?
Regards,
Ashish
Re: How to Undo a drop table operation? [message #578097 is a reply to message #578093] Sun, 24 February 2013 08:01 Go to previous messageGo to next message
Michel Cadot
Messages: 58545
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Database SQL Reference
Annex A How to Read Syntax Diagrams

In addition, in the first link Dariyoosh gave you there are examples.
Of course, you have to read to learn and not just we spoon feed you.

Regards
Michel
Re: How to Undo a drop table operation? [message #578099 is a reply to message #578086] Sun, 24 February 2013 08:06 Go to previous messageGo to next message
ashishpatel1992
Messages: 38
Registered: February 2013
Location: India
Member
What I understood is only that if you havent created restore point before. You can't undo the drop table operation.
Does that mean same?
Re: How to Undo a drop table operation? [message #578102 is a reply to message #578099] Sun, 24 February 2013 08:09 Go to previous messageGo to next message
Michel Cadot
Messages: 58545
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is not correct.
What does may think that? Post a link and quote the sentence.

Regards
Michel
Re: How to Undo a drop table operation? [message #578110 is a reply to message #578102] Sun, 24 February 2013 08:18 Go to previous messageGo to next message
ashishpatel1992
Messages: 38
Registered: February 2013
Location: India
Member
Link:
http://docs.oracle.com/cd/E11882_01/server.112/e26088/img_text/flashback_table.htm
Shows:
FLASHBACK TABLE
   [ schema. ] table
     [, [ schema. ] table ]...
   TO { { { SCN | TIMESTAMP } expr
        | RESTORE POINT restore_point
        } [ { ENABLE | DISABLE } TRIGGERS ]
      | BEFORE DROP [ RENAME TO table ]
      } ;

here I am talking about restore point.
I only know that statements in [] are optional.
So flash back to restore point means restoring the table state to a previous time state?
I have no idea how to undo table drop operation.
I tried rollback it didnt work Sad
Re: How to Undo a drop table operation? [message #578114 is a reply to message #578110] Sun, 24 February 2013 08:25 Go to previous messageGo to next message
Michel Cadot
Messages: 58545
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
here I am talking about restore point.


And what is the relation with your original question?
If this is a new one, start a new topic.

Quote:
So flash back to restore point means restoring the table state to a previous time state?


Correct.

Quote:
I have no idea how to undo table drop operation.


"TO BEFORE DROP" does not hit something in your head?

Read the link I gave you to understand syntax diagram.

Regards
Michel
Re: How to Undo a drop table operation? [message #578119 is a reply to message #578110] Sun, 24 February 2013 08:28 Go to previous messageGo to next message
Solomon Yakobson
Messages: 1955
Registered: January 2010
Senior Member
ashishpatel1992 wrote on Sun, 24 February 2013 09:18
I only know that statements in [] are optional.


And you didn't bother reading FLASHBAK TABLE documentation, right?

SY.
Re: How to Undo a drop table operation? [message #578121 is a reply to message #578114] Sun, 24 February 2013 08:28 Go to previous messageGo to next message
ashishpatel1992
Messages: 38
Registered: February 2013
Location: India
Member
Wow.
Thanks a lot. I must consider | as or.
Well can you tell me what does {} <- describes?
Like content inside [] <-- describes optional content.
Similarly what does {} describes?
Regards,
Ashish
Re: How to Undo a drop table operation? [message #578125 is a reply to message #578121] Sun, 24 February 2013 08:30 Go to previous message
Michel Cadot
Messages: 58545
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Just read the link I gave you.

Regards
Michel
Previous Topic: How to check table properties? (desc only shows if it is null)
Next Topic: Decrease precision or scale error
Goto Forum:
  


Current Time: Thu Jul 24 23:36:08 CDT 2014

Total time taken to generate the page: 0.07461 seconds