In Oracle, a collection expression followed by the operator IS EMPTY returns TRUE when the collection has zero elements and FALSE otherwise. It is primarily used with PL/SQL-defined nested tables or varrays that are stored as columns or variables. The operator is evaluated at run time and does not raise an error if the collection is NULL; instead, NULL IS EMPTY yields NULL, preserving three-valued logic. EMPTY improves readability compared with COUNT(collection)=0 and avoids the performance cost of counting elements.
IS NOT EMPTY, COLLECTION METHODS, COUNT(collection), NESTED TABLE, VARRAY
Oracle8i (1998) with introduction of collection types
It returns NULL, not TRUE. You must coalesce or handle NULL explicitly if you need a Boolean TRUE/FALSE result.
No. IS EMPTY works only with nested tables and varrays, not with PL/SQL associative arrays (index-by tables).
Use IS NOT EMPTY:```IF l_items IS NOT EMPTY THEN -- process itemsEND IF;```
No. It is an Oracle-specific extension and is not available in PostgreSQL, MySQL, SQL Server, or SQLite.