SQL QUERY - NOT CONTAINS VALUES FROM TWO TABLES AND SAME COLUMNS
DESCRIPTION:
In my example I have used Toad SQL Server 2008 as a query analyser.
Objective:
To obtain the not contains value of a two tables with same column name., if table A has a column city and table B has a column city, in this scenario we need to get the cities of table A which not contains in table B.
Table "A" contains
Table "B" contains
Now I need to get the cities from table "A" which not contains in table "B"
The query is,
and we get the result as shown in below,
Thank you!
DESCRIPTION:
In my example I have used Toad SQL Server 2008 as a query analyser.
Objective:
To obtain the not contains value of a two tables with same column name., if table A has a column city and table B has a column city, in this scenario we need to get the cities of table A which not contains in table B.
Table "A" contains
Table "B" contains
Now I need to get the cities from table "A" which not contains in table "B"
The query is,
Thank you!
No comments:
Post a Comment