Search notes:

Oracle SQL: FLASHBACK TABLE

Simple example

In order to be able to flashback a table, it needs to be created with enabled row movement.
drop table fb_t purge;
create table fb_t (
   a number,
   b varchar2(10)
)
enable row movement;
insert into fb_t values (1, 'one');
insert into fb_t values (2, 'two');
commit;
select current_scn from v$database;
--
-- 3096729
insert into fb_t values (3, 'three');
commit;
select current_scn from v$database;
--
-- 3096735
select * from fb_t;
--
--          A B
-- ---------- ----------
--          1 one
--          2 two
--          3 three
flashback table fb_t to scn 3096729;
select * from fb_t;
--
--          A B
-- ---------- ----------
--          1 one
--          2 two
flashback table fb_t to scn 3096735;
select * from fb_t;
--
--          A B
-- ---------- ----------
--          1 one
--          2 two
--          3 three
insert into fb_t values (4, 'four');
commit;
--
--          A B
-- ---------- ----------
--          1 one
--          2 two
--          4 four
flashback table fb_t to scn 3096735;
select * from fb_t;
--
--          A B
-- ---------- ----------
--          1 one
--          2 two
--          3 three

See also

The statement flashback table … to before drop restores a table from the recycle bin.
flashback database
Workspace Manager
Oracle Flashback Technology

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758207231, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/statement/nouns/table/flashback/index(119): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78