per commenti semplici:
set serveroutput on format wrapped;
begin
DBMS_OUTPUT.put_line('simple comment');
end;
/
-- do something
begin
DBMS_OUTPUT.put_line('second simple comment');
end;
/
dovresti ottenere:
anonymous block completed
simple comment
anonymous block completed
second simple comment
se vuoi stampare i risultati delle variabili, ecco un altro esempio:
set serveroutput on format wrapped;
declare
a_comment VARCHAR2(200) :='first comment';
begin
DBMS_OUTPUT.put_line(a_comment);
end;
/
-- do something
declare
a_comment VARCHAR2(200) :='comment';
begin
DBMS_OUTPUT.put_line(a_comment || 2);
end;
il tuo output dovrebbe essere:
anonymous block completed
first comment
anonymous block completed
comment2