Search Postgresql Archives

Hi there, new here and have question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Everyone.
I'm just subscribe to the mailing list
I'm new to Postgresql and
I have a question

I intend to make a function that returns more than a row
I tried something like below

create function listofemployeebasedondepartment(id_dept int) $$
declare
 resultset ??;
begin
    select * into resultset from employee where id_dept = id_dept;
    return resultset;
end
$$ language 'plpgsql';

I believe you get what I want
But I just couldn't finish the code since I miss something
I manage to find 'setof' but have no idea on how to use it

Any suggestion everyone?

Thank you,
Regards,
Hendra


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux