日期:2014-05-17 浏览次数:20804 次
declare
v_Sql varchar2(2000);
v_count number;
begin
for xx in (select t.OWNER, t.TABLE_NAME, t.COLUMN_NAME
from dba_tab_columns t
where t.OWNER = 'SCOTT') loop
begin
v_Sql := 'select count(1) from '
------解决方案--------------------
xx.owner
------解决方案--------------------
'.'
------解决方案--------------------
xx.table_name
------解决方案--------------------
' where '
------解决方案--------------------
xx.column_name
------解决方案--------------------
' like ''%Adan%'' ';
execute immediate v_Sql
into v_count;
if (v_count >= 1) then
dbms_output.put_line(xx.table_name
------解决方案--------------------
':'
------解决方案--------------------
xx.column_name);
end if;
exception
when others then
null;
end;
end loop;
end;