Compare records from two tables

The main functions of the minus operation are: When two tables or two query results are performed,
the records in the first table/query result that are different from the second table/query result are returned. For
example , the data in table A is as follows:
ID NAME ADDRESS TEL
1 ABC AAAA 123456
2 ABD BBBB 123455
3 ABE CCCCC 111111 For
example, the data in table B is as follows:
ID NAME ADDRESS TEL
1 ABC AAAC 123456
2 ABD BBBB 123455
Then the result of
(SELECT * FROM A)
MINUS
(SELECT * FROM B)
Yes:
1 ABC AAAA 123456 
3 ABE CCCCC 111111
The first row of data in the result is because the ADDRESS in table A and B are not
equal The second row of data in the result is because the data in table A does not exist in table B

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326273090&siteId=291194637