Oracle accidentally deleted data recovery

Source: Internet
Author: User
When I accidentally deleted the data that should not be deleted today, I found a method on the Internet. The steps are as follows: 1. Create a temporary table and store the data before you perform the delete operation. When the delete operation is performed, the final parameter is provided. The following statement is the operation in the last hour. CREATETABLEQUICK_TABLEASSELECT * FROMt_accou

When I accidentally deleted the data that should not be deleted today, I found a method on the Internet. The steps are as follows: 1. Create a temporary table and store the data before you perform the delete operation. When the delete operation is performed, the final parameter is provided. The following statement is the operation in the last hour. Create table QUICK_TABLE as select * FROM t_accou

When I accidentally deleted the data that should not be deleted today, I found a method on the Internet. The steps are as follows:

1. Create a temporary table to store the data before the deletion operation. When the delete operation is performed, the final parameter is provided.

The following statement is the operation in the last hour.

Create table QUICK_TABLE
SELECT * FROM t_account as of timestamp SYSDATE-1/24;

2. Get the differences between the two tables before and after the delete operation, and insert the deleted data into the current table.

Insert into t_account (
Select q. * from QUICK_TABLE q where q. account_id in (select q. account_id from QUICK_TABLE q) minus (select ta. account_id from t_account ta ))
)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.