Oracle Course #17: Recovering Deleted Table Records

Опубликовано: 01 Сентябрь 2026
на канале: Multiverso TI
1,107
16

In this lesson, we will learn how to recover deleted records from a table that have been committed and cannot be retrieved with a simple SELECT statement.

Code used in this lesson:

--------------------------------------------------------
delete from USUARIO_V2
where usuario ='RPABLO'

--RECOVERABLE DELETED RECORDS ARE STORED IN THE UNDO TABLESPACE
select * from dba_tablespaces

--RECOVER RECORD DELETED 1 HOUR AGO
SELECT * FROM USUARIO_V2 AS OF TIMESTAMP SYSDATE -1/24

--RECOVER RECORD DELETED BY EXACT DATE
SELECT * FROM USUARIO_V2 AS OF TIMESTAMP TO_DATE('18-10-2023 17:10:00','DD-MM-YYYY HH24:MI:SS')

--RECOVER RECORD DELETED 15 MINUTES AGO
SELECT * FROM USUARIO_V2 AS OF TIMESTAMP (SYSDATE - INTERVAL '15' MINUTE)