--Create Procedure
Create procedure Proc_StudentLogin(
Sid bigint,
inout get_result refcursor)
Language 'plpgsql'
AS $Body$
Begin
open get_result for
Select * from Students where id = sid;
End
$Body$;
--Call procedure
Call Proc_StudentLogin(1,'result');
fetch all in "result";
2
Answers
To return a result "table", use a function not a procedure: