SQL> SELECT 2 ( SELECT sysdate FROM dual ) 3 FROM dual; (SELECTSY --------- 07-MAR-06
So, as you can see, no longer do you need PL/SQL functions to issue a cursor and return a value, you can embed it directly in the SELECT statement.
So, what advantages does this bring? Well, there are many, from the simplifying of cursors, to the reduction of context switching . I go through the major reasons why you may want to consider this type of approach in the following sections.
----------------------------------------------------------------------------------
引用:http://www.oratechinfo.co.uk/scalar_subqueries.html