很简单,最前面加上下面这句
set serveroutput on;
PL/SQL Developer中不用此句也可以,但是Oracle Sql Developer需要此句,不然只会出现"匿名块已完成"