adspace


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 / thakur singh rawat

(select * from T1
minus
select * from T2)
union
(select * from T2
minus
select * from T1)

If no rows returns then it means that the two tables
contain the same values or say same.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If any stored procedure is encrypted, then can we see its definition in activity monitor?

1069


How do I find query history in sql server?

1022


What is subquery? Explain the properties of a subquery?

1058


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8227


List out the different types of locks available in sql server?

1049


How to provide default values to function parameters?

1256


How to remove duplicate rows from table except one?

1087


What are the different SQL Server Versions you have worked on?

1077


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

1046


What is clustered index

1085


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1132


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2564


What kind of problems occurs if we do not implement proper locking strategy?

1499


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1022


How to connect php with different port numbers?

1186