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


Please Help Members By Posting Answers For Below Questions

What is the federation in sql azure?

79


What are the types of processing and explain each? : sql server analysis services, ssas

736


What are the rules to use the rowguidcol property to define a globally unique identifier column?

589


you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration

550


Why do we use trigger?

552






What action plan is preferred if sql server is not responding?

529


What stored procedure can you use to display the current processes?

490


Where the sql logs gets stored?

538


what is database replicaion? : Sql server database administration

600


What are the types of database recovery models?

595


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

749


What is the report builder?

106


What is sqlcmd?

553


Describe in brief databases and sql server databases architecture.

524


What is b tree index?

511