When executing a script on SQLPlus, it prints a sequence of numbers instead of output

后端 未结 3 924
[愿得一人]
[愿得一人] 2021-01-20 16:05

I\'m trying to execute a script on SQL PLus, it\'s simple.

SET serveroutput ON;
DECLARE
    mode NUMBER(1) := 1;

IF (mode = 1) THEN

    prompt \'HERE\'

EN         


        
3条回答
  •  猫巷女王i
    2021-01-20 16:36

    You cannot use sqlplus command in plsql.We can use dbms_output instead which will display the output in SQL prompt

    SET serveroutput ON;
    DECLARE
    mode NUMBER(1) := 1;
    BEGIN
    IF (mode = 1) THEN
    dbms_output.put_line('HERE');
    END IF;
    dbms_output.put_line('fim');
    END;
    /
    

提交回复
热议问题