Prevent Oracle minus statement from removing duplicates

前端 未结 7 1772
南方客
南方客 2021-02-15 19:39

Given these two tables:

CREATE TABLE TEST1 (TEST  VARCHAR2(1 BYTE))
CREATE TABLE TEST2 (TEST  VARCHAR2(1 BYTE))

Where TEST1 has two rows both w

相关标签:
7条回答
  • 2021-02-15 20:07

    the ALL modifier makes UNION return all rows (e.g., UNION ALL), maybe it can be applied to MINUS? As in

    select field1 from table1
    minus all
    select field2 from table2
    
    0 讨论(0)
提交回复
热议问题