I am Having tables T1 and T2 both having same data how to
check (or) compare the data in both table are same?
Answer Posted / asharaf ali
(SELECT * FROM @T1
EXCEPT
SELECT * FROM @T2)
UNION
(SELECT * FROM @T2
EXCEPT
SELECT * FROM @T1)
If the above query returned no records, the data in both table are same.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
How to Insert multiple rows with a single insert statement?
What is difference between equi join and inner join?
How many types of built in functions are there in sql server 2012?
Explain about Normalization?
What are unicode character string data types in ms sql server?
What is dml command?
What is difference between equi join and natural join?
Can I disable or restrict ssrs export formats (rendering formats)?
What Is Rdbms?
Which are the third-party tools used in sql server and why would you use them?
What are data regions?
How many null values we can have in a unique key field in sql server?
Do you know sql server 2008 backup compression?
What happens if null values are involved in arithmetic operations?
What is delete query?