我想通過簡單地從select語句分配一個變量來學習PL/SQL,然後,爲了確認它的工作,打印它的sql輸出。PL/SQL,無法打印變量
DECLARE ALLOW_STUFF NUMBER;
BEGIN
SELECT VAL_N INTO ALLOW_STUFF FROM MY_TABLE WHERE MY_KEY = 'ALLOW_ME';
DBMS_OUTPUT.PUT_LINE(ALLOW_STUFF);
END;
我正在使用SQL Developer和/或SQL PLus。當我運行它,我得到的是
Anonymous block completed
比超過MY_TABLE.VAL_N
'set serveroutput on' http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_eight.htm#sthref952 –