I need some help with objects. My object is as follows:
type myrctype is ref cursor return ACCOUNT%ROWTYPE;

In my PL/SQL function I have a statement like this.

rc myrctype;

begin

open rc for select * from account;
return rc;

It then selects everything from account and returns it. My problem is how to display the results in SQL Plus. I do something like the following but it doesn't work:

declare

x myrctype;

begin

x := myfunction();
dbms_output.put_line(x);
end;
/

It works fine without the dbms_output statement. I want to display the results. Can anyone help me with this?