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

How will you decide the active and passive nodes?

1179


What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration

1125


What is a join in sql?

1155


can a database be shrunk with users active? : Sql server administration

1063


What are the database objects? : SQL Server Architecture

1098


What is the difference between TRUNCATE and DROP?

1188


What is snapshot report?

172


What is TDS(Tabular Data Stream) Gateway?

127


Why truncate is ddl command?

1116


Name 3 ways to get an accurate count of the number of records in a table?

1086


How you trouble shoot when any job fails

1982


Can binary strings be converted into numeric or float data types?

1096


What is a covered index?

987


what are the critical issues you have resloved in your company

2016


What command would you use to create an index?

1107