What is the difference between UNION and UNIONALL?
Answer Posted / amit dixit
Just Above is OK except UNION ALL result modified..
Example:
Table 1 : First,Second,Third,Fourth,Fifth
Table 2 : First,Second,Fifth,Sixth
Result Set:
UNION: First,Second,Third,Fourth,Fifth,Sixth (This will
remove duplicate values)
UNION ALL:
First,First,Second,Second,Third,Fourth,Fifth,Fifth,Sixth
(This will repeat values)
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why we should not use triggers?
What is the purpose of the master database?
If any stored procedure is encrypted, then can we see its definition in activity monitor?
What stored procedure would you use to view lock information?
What are the different ways you can create databases in sql server?
What is the default fill factor value?
How do you identify a foreign key?
What is merge statement?
What are the differences between having and where clause.
How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?
What are the underflow and overflow behaviors on float literals?
What is tempdb in sql server?
What is CTE in SQL
Explain different backup plans?
How to change server name in sql server?