Oracle Multiset Union distinct
DECLARE
TYPE limbs_t IS TABLE OF limbs%ROWTYPE;
l_limbs limbs_t;
BEGIN
SELECT l.nm, l.avg_len
BULK COLLECT INTO l_limbs
FROM limbs l
ORDER BY l.nm;
l_limbs := l_limbs MULTISET UNION l_limbs;
DBMS_OUTPUT.put_line ('Lots of limbs! ' || l_limbs.COUNT);
END;
Old-fashioned Ostrich