我對如何使用循環PL/SQL來獲取所有列表結構表的問題,所有的結構表,PL/SQL得到神諭
我有語法循環像波紋管:
BEGIN
FOR x IN (SELECT table_name FROM user_tables)
LOOP
EXECUTE IMMEDIATE 'DESC' || x.table_name;
END LOOP;
COMMIT;
END;
這從SQL Developer的日誌輸出
Error starting at line 14 in command:
BEGIN
FOR x IN (SELECT table_name FROM user_tables)
LOOP
EXECUTE IMMEDIATE 'DESC' || x.table_name;
END LOOP;
COMMIT;
END;
Error report:
ORA-00900: invalid SQL statement
ORA-06512: at line 4
00900. 00000 - "invalid SQL statement"
*Cause:
*Action:
幫我解決這個
感謝
如何獲取psql中所有表的列表:http://dba.stackexchange .com/questions/1285/how-do-i-list-all-databases-and-tables-with-psql-command-line-tool/ –