Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 difference between a function and a stored procedure?

1077


What are different types of schemas?

947


What is the recursive stored procedure in sql server?

1027


What command is used to delete a table from the database in the sql server and how?

1119


Explain what is the use of custom fields in report?

929


What do you understand by sql server agent?

980


What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.

1274


How to delete all rows with truncate table statement in ms sql server?

1005


what are database files and filegroups? : Sql server database administration

951


last function used in MS Access to convert sql what function will use in sql

2078


Explain the difference between cross join and full outer join?

983


How do I setup a local sql server database?

1012


What are different type of Collation Sensitivity?

1005


What is exclusive locks?

964


Explain the third normal form(3nf)?

950