I just wanted to know what are these functions (CAST and MULTISET).
I saw an SQL which had these functions in them.
Any help would be of great use.
It's all to do with Object Types. CAST tells Oracle the required datatype for the result of an expression, and MULTISET tells Oracle to put the multiple rows returned by a SELECT statement into a single collection object.
So you could see this:
CREATE TYPE emp_t IS OBJECT
( empno NUMBER, ename VARCHAR2(10) );
CREATE TYPE emp_tab_t IS TABLE OF emp_t;
SELECT CAST( MULTISET( SELECT empno, ename FROM emp) AS emp_tab_t ) emptab
The result set consists of 1 row, with datatype emp_tab_t, which contains the data for all employees.