1. 程式人生 > >執行PL/SQL塊時出現 ORA-06550 錯誤(批量建表)

執行PL/SQL塊時出現 ORA-06550 錯誤(批量建表)

SQL> select * from v$version;
 
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

直接上圖

報出的錯誤,感覺有點迷惑,就查看了一下官方文件

官方解釋

ORA-06550: line string, column string: string

Cause: Usually a PL/SQL compilation error.

Action: None

網路查詢解決方案

ORA-06550 line string, column string:string
Cause: A PL/SQL compilation error has occurred. The numbers given for line and column are the location in the PL/SQL block where the error occurred.
Action: Refer to the following PL/SQL messages for more information about the error.

最終還是要看報錯資訊,提示是第7行0列出現了問題,又有關於;號的提示,難道end後需要加;號,於是就加上去;

OK,執行成功;

看來執行PL/SQL塊語法還是要嚴謹一點,要告訴它什麼時候結束;