问题
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