what is differece between union and union all

Answer Posted / shabanafazal

in case of 'union' the data of two tables are combined
together with no repetition where as incase of 'union all'
repetition of data is done e.g in table 'A' we have name
saad three times and in 'B' table name 'ssad' is present
one time then in case of 'union' 'saad' is appeard once
(when union of table 'A' and 'B' is done). where as in case
of 'union all' the name 'saad' will repeated four times.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Other than truncate statement, which other command can by-pass the trigger on the tables?

624


What is the difference between dataadapter and datareader?

551


How we can refresh the view?

600


What is the difference between the 2 operating modes of database mirroring?

584


How can we determine what objects a user-defined function depends upon?

524






How can you control the amount of free space in your index pages?

628


How can we delete Duplicate row in table?

642


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?

2020


What is function of master database?

94


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

559


Explain something about security and SQL Azure?

90


What are the difference between clustered and a non-clustered index?

599


What is normalization according to you and explain its different levels?

531


Tell me about normalization in DBMS.

591


Explain the working of sql privileges?

613