SQL > SQL????? > Intersect

UNION ?????? ???? INTERSECT ? ???SQL??? ??? ??? ?? ????????. ??? ?? UNION ? ??? ??? OR (?? ? ??? ???? ??? ??? ????? ??????),??? INTERSECT ? AND ? ?????. (? ??? ???? ??? ??? ????? ???.). UNION ? ???? INTERSECT ? ?????.

INTERSECT ? ??:

[SQL ?? 1]
INTERSECT
[SQL ?? 2];

??? ?? ??? ??? ??? ????

Store_Information ??
Store_NameSalesTxn_Date
Los Angeles150005-Jan-1999
San Diego25007-Jan-1999
Los Angeles30008-Jan-1999
Boston70008-Jan-1999

Internet_Sales ??
Txn_DateSales
07-Jan-1999250
10-Jan-1999535
11-Jan-1999320
12-Jan-1999750

??? ???? ?? ??? ??? ??? ???? ???? ???. ? ??? ???? ???? ?? SQL??? ???????.

SELECT Txn_Date FROM Store_Information
INTERSECT
SELECT Txn_Date FROM Internet_Sales;

??:

Txn_Date
07-Jan-1999

INTERSECT ???????? ??? ??? ???? ???? ??? ??????.

SQL MINUS >>
?


Copyright © 2021   1keydata.com   All Rights Reserved