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 the difference between a function and a stored procedure?
What are different types of schemas?
What is the recursive stored procedure in sql server?
What command is used to delete a table from the database in the sql server and how?
Explain what is the use of custom fields in report?
What do you understand by sql server agent?
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.
How to delete all rows with truncate table statement in ms sql server?
what are database files and filegroups? : Sql server database administration
last function used in MS Access to convert sql what function will use in sql
Explain the difference between cross join and full outer join?
How do I setup a local sql server database?
What are different type of Collation Sensitivity?
What is exclusive locks?
Explain the third normal form(3nf)?