10g_union.sql

来自「OReilly Oracle PL SQL Programming第4版源代码」· SQL 代码 · 共 31 行

SQL
31
字号
DECLARE 
   our_authors strings_nt := strings_nt();
BEGIN
    our_authors := authors_pkg.steven_authors 
                   MULTISET UNION authors_pkg.veva_authors;

    authors_pkg.show_authors ('MINE then VEVA', our_authors);
    
    our_authors := authors_pkg.veva_authors 
                   MULTISET UNION authors_pkg.steven_authors;

    authors_pkg.show_authors ('VEVA then MINE', our_authors);
    
    our_authors := authors_pkg.steven_authors 
                   MULTISET UNION DISTINCT authors_pkg.veva_authors;

    authors_pkg.show_authors ('MINE then VEVA with DISTINCT', our_authors);
    
    our_authors := authors_pkg.steven_authors
                   MULTISET INTERSECT authors_pkg.veva_authors;

    authors_pkg.show_authors ('IN COMMON', our_authors);    
    
    our_authors := authors_pkg.veva_authors 
                   MULTISET EXCEPT authors_pkg.steven_authors;

    authors_pkg.show_authors (q'[ONLY VEVA'S]', our_authors);       
END;
/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?