@TOC set serveroutput on;选项缺失或无效 set serveroutput on;选项缺失或无效 我的报错原因是因为编译该段代码使用的是SQL窗口,而执行sqlplus脚本需使用plsql develop中的命令窗口。