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
What is change tracking in sql server?
How efficient you are in oracle and SQL server?
What is the function of sql server agent windows service?
What is use of attribute hierarchy optimized state? : sql server analysis services, ssas
What is a virtual table in sql?
What is difference between count (*) and count 1?
Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?
What is the use of set nocount on/off statement?
Explain the phases a transaction has to undergo?
What Are the Main Features of SQL Azure?
What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?
List the various tools available for performance tuning?
how to control the amount of free space in your index pages? : Sql server database administration
Explain can you implement data mining in ssrs?
Would you store your query in a ssrs report or a database server? State the reason why?