You are on page 1of 2

select * from employees where employee_id = 101;

select * from job_history where employee_id = 101;


set autocommit on;
delete fom job_history;
select * from job_history
as of timestamp to_timestamp('2014-12-24 00:58:00', 'YYYY-MM-DD HH24:MI:SS');
insert into job_history
select * from job_history
as of timestamp to_timestamp('2014-12-24 00:58:00', 'YYYY-MM-DD HH24:MI:SS');
-------------------------------------------------------------------------------select flashback_on, log_mode from v$database;
select current_scn from v$database;
1482145
create table emp(empno number(2));
insert into emp values(10)
commit;
select current_scn from v$database;
1482211
insert into emp values(20);
commit;
select current_scn from v$database;
1482265
delete emp;
commit;
flashback table emp to scn 1482211;
flashback table emp to scn 1482265;
commit;
--------------------------------------------------------------------------create global temporary table test_temp3
( col1 number(3),
col2 varchar2(20));
on commit delete rows;
on commit preserve rows;
select * from test_temp3;
insert into test_temp3 values(1, 'a');
commit;
-------------------------------------------------------------------------CREATE OR REPLACE DIRECTORY emp_dir AS 'C:\mypgms\names.txt';

CREATE TABLE admins


(emp_id number(4),
ename varchar2(20),
job varchar2(20)
)
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY emp_dir
ACCESS PARAMETERS
( records delimited by newline
fields terminated by ','
)
LOCATION ('names.txt')
)
REJECT limit unlimited
/
-----------------------------------------------------------------------select * from v$sessions
ALTER SYSTEM KILL SESSION 'SID,SERIALNO';
-------------------------------------------------------------------------

You might also like