crea un fichero pl/sql y mete esto dentro….
set serveroutput on size 1000000
declare
total number(9);
motcle varchar2(80) := 'PALABRA A BUSCAR';
cmdtodo varchar2(512);
begin
for c1 in ( select distinct table_name , column_name , data_type
from user_tab_columns
where data_type in ('CHAR','NCHAR','NUMBER','NVARCHAR2','VARCHAR2')
)
loop
total := 0;
if c1.data_type in ('CHAR','NCHAR','NVARCHAR2','VARCHAR2')
then
cmdtodo := 'select count(*) from ' || c1.table_name
|| ' where ' ||c1.column_name || ' like ' || '''' || '%' || motcle || '%'
|| '''' ;
execute immediate cmdtodo into total;
elsif c1.data_type in ('NUMBER') and 1=2
then
cmdtodo := 'select count(*) from ' || c1.table_name
|| ' where ' ||c1.column_name || ' = ' || motcle ;
execute immediate cmdtodo into total;
end if;
if total != 0
then
dbms_output.put_line(c1.table_name || ':' ||c1.column_name||':'||to_char(total));
end if;
end loop;
end;
/
.. Al cesar lo que es del cesar. Este script ha sido implementado por Laurent DUCHET.