how to do a function to return row type from a table in pl/sql?
<p>I made this function but it return an error when i execute it!</p>

<pre><code>create or replace function get_accounts
(Acc_id in Account1.account_id%Type)
return account1%rowtype
as
l_cust_record account1%rowtype;
begin
select * into l_cust_record from account1
where account_id=Acc_id;
return(l_cust_record);
end;
/
</code></pre>