Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Recover a Dropped Table
How To Recover a Dropped Table? - Oracle DBA FAQ - Managing Oracle Database Tables
✍: FYIcenter.com
If you accidentally dropped a table, can you recover it back? The answer is yes, if you have the recycle bin feature turned on. You can use the FLASHBACK TABLE ... TO BEFORE DROP statement to recover a dropped table from the recycle bin as shown in the following SQL script:
SQL> CREATE TABLE emp_dept_90
2 AS SELECT * FROM employees WHERE department_id=90;
Table created.
SQL> SELECT COUNT(*) FROM emp_dept_90;
COUNT(*)
----------
3
SQL> DROP TABLE emp_dept_90;
Table dropped.
SQL> FLASHBACK TABLE emp_dept_90 TO BEFORE DROP
2 RENAME TO emp_dept_bck;
Flashback complete.
SQL> SELECT COUNT(*) FROM emp_dept_bck;
COUNT(*)
----------
3
The FLASHBASK statement in this script recovered the dropped table "emp_dept_90" to new name "emp_dept_bck". All the data rows are recovered nicely.
2007-05-03, 5151👍, 0💬
Popular Posts:
What is the result of using Option Explicit? When writing your C program, you can include files in t...
How To Create an Add-to-Netvibes Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
Can include files be nested? The answer is yes. Include files can be nested any number of times. As ...
Can you prevent a class from overriding ? If you define a class as “Sealed” in C# and “NotInheritab...
What is the sequence of UML diagrams in project? First let me say some fact about this question, you...