Oracle's minus returns data from the first table that is not in the second table

Source: Internet
Author: User

Oracle's minus returns data from the first table that is not in the second table

CREATE TABLEhovertree_union_1 (IDINT, ValVARCHAR(Ten)  ); CREATE TABLEhovertree_union_2 (IDINT, ValVARCHAR(Ten)  ); INSERT  intoHovertree_union_1VALUES(1,'A'); INSERT  intoHovertree_union_1VALUES(2,'B'); INSERT  intoHovertree_union_1VALUES(3,'C'); INSERT  intoHovertree_union_2VALUES(1,'A'); INSERT  intoHovertree_union_2VALUES(1,'A'); INSERT  intoHovertree_union_2VALUES(2,'B'); INSERT  intoHovertree_union_2VALUES(4,'D'); SQL> SELECT *  fromhovertree_union_12minus3 SELECT *  fromhovertree_union_2; ID VAL---------- --------------------  3C SQL> SELECT *  fromhovertree_union_22minus3 SELECT *  fromhovertree_union_1; ID VAL---------- --------------------  4D--how to ask Hovertree.com

Recommendation: http://www.cnblogs.com/roucheng/p/3504463.html

Oracle minus returns data from the first table that is not in the second table

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.