Capgemini interview question

Write PLSQL code block to return multiple of records from table using function

Interview Answer

Anonymous

Mar 4, 2025

I Answered this Question by write sample code and explain the how it works and why to use. CREATE OR REPLACE FUNCTION get_employees RETURN Ref Cursor AS Declare RetCur Ref Cursor; BEGIN OPEN RetCur FOR SELECT employee_id, employee_name, salary FROM employees; RETURN RetCur ; END get_employees;