I need to extract and display all the years for all the records in db using member function in oracle 11g.
CREATE or replace TYPE BODY student_t AS MEMBER FUNCT
It is much simpler:
yearDOB SYS_REFCURSOR; BEGIN OPEN yearDOB for SELECT EXTRACT(YEAR FROM s.dob) c_year from student s; return yearDOB; END;