测试
-- Create table create table B_SD_PACK_TMP_DETAIL ( ID number, TMP_ID number, IMSI_NO NVARCHAR2(40), DEVICE_NUMBER NVARCHAR2(11), GOOD_FLAG number(2) default 0 STATUS number(2), NOTE nvarchar2(50), ) ;
-- Create table create table B_SD_PACK_TMP_DETAIL ( ID number, TMP_ID number, IMSI_NO NVARCHAR2(40), DEVICE_NUMBER NVARCHAR2(11), GOOD_FLAG number(2) default 0 STATUS number(2), NOTE nvarchar2(50), ) ;
-- Create table create table B_SD_PACK_TMP_DETAIL ( ID number, TMP_ID number, IMSI_NO NVARCHAR2(40), DEVICE_NUMBER NVARCHAR2(11), GOOD_FLAG number(2) default 0 STATUS number(2), NOTE nvarchar2(50), ) ;
select 'create sequence '||sequence_name||' minvalue 1 maxvalue 999999999999999999999999999 start with 1 increment by 1 cache 20;' from user_sequences
select 'create sequence '||sequence_name||' minvalue 1 maxvalue 999999999999999999999999999 start with 1 increment by 1 cache 20;' from user_sequences
SQL> select dbms_flashback.get_system_change_number from dual; GET_SYSTEM_CHANGE_NUMBER ------------------------ 479197 SQL> select sal from emp where ename='SCOTT'; SAL --------- 3000.00 SQL> update emp set sal = 5000 where ename='SCOTT'; 1 row updated SQL> commit; Commit complete SQL> select sal from emp where ename='SCOTT'; SAL --------- 5000.00 SQL> select sal from emp as of scn 479197 where ename='SCOTT'; SAL --------- 3000.00
SQL> select dbms_flashback.get_system_change_number from dual; GET_SYSTEM_CHANGE_NUMBER ------------------------ 479197 SQL> select sal from emp where ename='SCOTT'; SAL --------- 3000.00 SQL> update emp set sal = 5000 where ename='SCOTT'; 1 row updated SQL> commit; Commit complete SQL> select sal from emp where ename='SCOTT'; SAL --------- 5000.00 SQL> select sal from emp as of scn 479197 where ename='SCOTT'; SAL --------- 3000.00
作者:czjie
出处:http://www.cnblogs.com/czjie/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。