DBMS OUTPUT PUT doesn't print anything

心已入冬 提交于 2019-12-13 06:46:21

问题


I'm new to PL/SQL and I want to show the following message. When I compile it in SQL Developer I only get

  PL/SQL procedure successfully completed.

My code is this:

SET SERVEROUTPUT ON;

DECLARE
  mesaj VARCHAR2 (100) := 'PL/SQL';
BEGIN
  DBMS_OUTPUT.PUT(mesaj);
END;
/

回答1:


You need to add an end-of-line marker by calling DBMS_OUTPUT.NEW_LINE;. End-of-line marker is added by PUT_LINE but not by PUT.

SET SERVEROUTPUT ON;

DECLARE
  mesaj VARCHAR2 (100) := 'PL/SQL';
BEGIN
  DBMS_OUTPUT.PUT(mesaj);
  DBMS_OUTPUT.NEW_LINE;
END;
/


来源:https://stackoverflow.com/questions/34731685/dbms-output-put-doesnt-print-anything

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!