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 will you decide the active and passive nodes?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is a join in sql?
can a database be shrunk with users active? : Sql server administration
What are the database objects? : SQL Server Architecture
What is the difference between TRUNCATE and DROP?
What is snapshot report?
What is TDS(Tabular Data Stream) Gateway?
Why truncate is ddl command?
Name 3 ways to get an accurate count of the number of records in a table?
How you trouble shoot when any job fails
Can binary strings be converted into numeric or float data types?
What is a covered index?
what are the critical issues you have resloved in your company
What command would you use to create an index?