SQL> SELECT eid, CURSOR (
2 SELECT d1.pname.fname FROM TABLE( employees.dependents ) d1
3 WHERE d1.age = ( SELECT MAX( d2.age )
4 FROM TABLE( employees.dependents ) d2 ) )
5 FROM employees;
EID CURSOR(SELECTD1.PNAM
---------- --------------------
101 CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
PNAME.FNAME
--------------------------------
Susan
102 CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
PNAME.FNAME
--------------------------------
David
SQL> SELECT eid, d1.pname.fname
2 FROM employees e, TABLE( e.dependents ) d1
3 WHERE d1.age = ( SELECT MAX( d2.age )
4 FROM TABLE( e.dependents ) d2 );
EID PNAME.FNAME
---------- --------------------------------
101 Susan
102 David
|
|