在这个存储的过程片段中:
CREATE OR REPLACE PROCEDURE PORTAL_OWNER.searchAtTransfers_prc_xmltype (
usercredential IN VARCHAR,
doc_result_cursor OUT SYS_REFCURSOR)
IS
..
..
docExtTable DOC_TABLETYPE;//user defiend type that is a collection of below Type.
docExtRecord DOC_ROWTYPE;//user defined type
BEGIN
SELECT DOC_ROWTYPE (extractvalue (value (t), 'transfers/userRequestId')
, extractvalue (value (t), 'transfers/fromAccount/acctId')
BULK COLLECT INTO docExtTable
FROM TABLE (XMLSEQUENCE (EXTRACT (response, '//transferSearchResponse/transfers'))) t;
OPEN doc_result_cursor FOR
SELECT * FROM TABLE (CAST (docExtTable AS DOC_TABLETYPE));
COMMIT;
END;
我的问题是:为什么我们需要CAST (docExtTable AS DOC_TABLETYPE
什么时候docExtTable
已经被定义为DOC_TABLETYPE