declare
cursor CrListaAtributos (pTabla varchar2) is
select COLUMN_NAME
from all_tab_columns
where TABLE_NAME = pTabla ;
cursor CrListatablas is
select distinct tablas.table_name
from all_tables tablas
where table_name not like '%$%'
and owner not like '%SYS%';
vNomTabla all_tables.table_name%type;
vAtributoTabla all_tab_columns.table_name%type;
begin
open CrListatablas;
loop
fetch CrListatablas into vNomTabla;
exit when CrListatablas %notfound;
dbms_output.put_line('--------------------------------');
dbms_output.put_line(vNomTabla);
dbms_output.put_line('--------------------------------');
open CrListaAtributos(vNomTabla);
loop
fetch CrListaAtributos into vAtributoTabla;
exit when CrListaAtributos%notfound;
dbms_output.put_line(vAtributoTabla);
end loop;
close CrListaAtributos;
end loop;
close CrListatablas;
end;
No hay comentarios.:
Publicar un comentario