Compare two tables in sql

Hiiiiiiiiiii

How To Compare 2 Tables


 In Sql Server you can easily compare two table
and find the unmatched data from this query bt both the tables should have atleast one common column having same data type to be matched


Suppose there are two tables
AdsRecord  and AdsRecord_1

Both of the table is having one common field named 'Serial'

Now the query to get the unmatched row from AdsRecord to AdsRecord_1 is :


Select serial from AdsRecord where serial not in
(Select serial from AdsRecord_1 )


The Query works perfect.

Have Fun
Enjoy

MCTS Rajshree Mittal
Software Developer