2
CREATE OR REPLACE PROCEDURE TEST_PROC
IS
  str varchar(100);
  rec_count INTEGER;

BEGIN
    str := 'select count(*) from emp_record';
    EXECUTE IMMEDIATE str into rec_count;
    dbms_output.put_line(rec_count);
END;

I can see output of this procedure in Toad(for oracle), but when i execute this in command line via sqlplus i see following output

SQL> exec test_proc;

PL/SQL procedure successfully completed.

so question is how can i see count output on command line.

1

1 Answer 1

3

You need to enable the output in SQL/PLUS before running your stored procedure:

SET SERVEROUTPUT ON
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.