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 ))
)