名站网址导航为大家提供关于数据库教程相关的教程网站知识。
ORACLE查询表最近更改数据的具体相关方法
复制具体相关代码 具体相关代码如下:,1、select uat.table_name from user_all_tables uat 该SQL可以获得所有用户表的名称 2、select object_name, created,last,复制具体相关代码 具体相关代码如下:,select uat.table_name as 表名,(select last_ddl_time from user_objects where object_name = uat.table_na
复制具体相关代码 具体相关代码如下:
-- Created on 2010/11/04 by WANGNAN
declare
-- Local variables here
i integer;
TYPE t_table IS TABLE OF VARChAR2(10 ) INDEX BY VARChAR2 (2);
v_t_table t_table;
TYPE t_pg3 IS TABLE OF asis.PG3_AGENTCD_CONVERSION% ROWTYPE;
v_pg3_table t_pg3;
c_pg3_vendor com.cRef;
v_str VARChAR2( 250);
begin
-- Test statements here
OPEN c_pg3_vendor FOR SELECT * FROM asis.PG3_AGENTCD_CONVERSION;
FETCh c_pg3_vendor BULK COLLECT INTO v_pg3_table;
FOR i IN 1 .. v_pg3_table.count LOOP
v_t_table(v_pg3_table(i).ASIS_AGENT_CD) := v_pg3_table(i).TOBE_VENDOR_CD;
END LOOP;
v_str := v_t_table.first;
WhILE v_str is NOT NULL LOOP
dbms_output.put_line(v_str || ' : ' ||v_t_table(v_str));
v_str := v_t_table.next(v_str);
END LOOP;
EXCEPTION WhEN OThERS ThEN
dbms_output.put_line( sqlerrm);
END;