Hi!
When I run a SQL query in SQL Developer, the result is displayed in a "query window". But output via PL/SQL is usually done via dbms_output. Which appears in a different window ("dbms output") and I do need to take care about formatting the output properly myself. If the PL/SQL code just creates the content of a database, it should be possible to use the same output facility as an ordinary SQL query. So that the output of the PL/SQL code appears in the query window. But how?
As a simple example: If I have this PL/SQL code
declare
i integer;
begin
dbms_output.put_line('i square');
for i in 0..9 loop
dbms_output.put_line(i || ' ' || i*i);
end loop;
end;
/
How to get the resulting table not shown in the "dbms output" window, but in the "query result" window?
Any pointer?