Oracle Multitenant: New SQL Container Clause

Tiny little enhancement in Oracle Database
The new CONTAINER clause to access data from different containers within one SQL statement. This may be very helpful, especially in case of schema consolidation. Similar things could have be done in Oracle already by using database links – but resulting in way more complicated SQLs.

This is the new clause:

SELECT ename FROM CONTAINERS(scott.emp) WHERE CON_ID IN (45, 49);

See the documentation for more info about it.


Share this:

4 thoughts on “Oracle Multitenant: New SQL Container Clause

  1. Hi

    The containers clause has a bug, it error with ORA-600 if one of the columns is a LOB.


    SQL> select * from containers(aud$);

    select * from containers(aud$)
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [kkdoilsn2], [], [], [], [], [], [],
    [], [], [], [], []



  2. Just recapping:
    I still receive the ORA-600 when selecting AUD$ regardless of the fact if I specify the schema or not. Still happens with the most recent PSU.

    This works:
    select count(*) from containers(obj$);

    This fails:
    select * from containers(sys.aud$);
    ORA-00600: internal error code, arguments: [kkdoilsn2]

Leave a Reply

Your email address will not be published. Required fields are marked *

* Checkbox to comply with GDPR is required


I agree

This site uses Akismet to reduce spam. Learn how your comment data is processed.