Oracle Deprecated Feature - THE keyword
THE function is deprecated effective Oracle 8.1.6. Instead, use the
TABLE function. Let's compare both functions.
THE function retrieves the value of each element of the nested table within the outer table.
TABLE function maps a collection to a database table.
For example, if you need to determine the rows within a table containing a collection that meets a certain criteria,
you need a
WHERE clause on the contents of a collection when selecting from a database table.
This can be accomplished by using the
The query for the
SALE_HEADER table, which has a collection, looks like this:
SELECT sale_id, detail_total, tax_amount, shipping_amount, sale_total
FROM sale_header sh
WHERE 78 in (SELECT detail_amount FROM TABLE(sh.detail_nest));