sasha_gud
sasha_gud

Reputation: 1735

Why anonymous block is executed twice in Toad when it contains output cursor?

I'm using Toad for Oracle 12.10.0.30. When the following anonymous block is executed using Editor -> Execute statement (F9) with :res being output cursor, the block is executed twice and DBMS output contains 'START' twice. If there is no output cursor, then the block is correctly executed once.

Can some one explain why it works this way?

begin
    DBMS_OUTPUT.put_line('START');

    open :res for
    select * from dual
    where rownum <= 100;

end;

toad execution result

Thanks!

Upvotes: 0

Views: 177

Answers (1)

Michael S.
Michael S.

Reputation: 1791

This is a bug in 12.10 that has been corrected in 12.11. You can find the original report of it here.

Upvotes: 1

Related Questions