我提供了这段代码来获取一个数据库中所有模式的所有表描述。我在网上搜索并想出了下面的代码。我无法弄清楚错误。
任何可以帮助解决此错误或为我提供解决问题的方法的人
SQL> Begin
2 For q in (select distinct owner from dba_objects)
3 loop
4 for r in (select table_name, owner from all_tables where owner = 'q.owner')
5 loop
6 dbms_output.put_Line('table '||r.table_name);
7 execute immediate 'desc ' || r.table_name
8 end loop;
9 end loop;
10 end;
11 /
end loop;
*
ERROR at line 8:
ORA-06550: line 8, column 3:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
return returning <an exponent (**)> <> or != or ~= >= <= <>
and or like like2 like4 likec between into using || bulk
member submultiset
The symbol ";" was substituted for "END" to continue.