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
What is optimization and its types?
Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
What is the difference between dataadapter and datareader?
How do I create a partition table in sql server?
What is the difference between cartesian product and cross join?
How can we determine what objects a user-defined function depends upon?
What is the difference between rank and dense_rank?
What is the exact numeric data type in sql?
While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?
Explain partitioned view?
Explain the difference between functions and stored procedures in sql server?
What is a user-defined function in the sql server and what is its advantage?
What is a constant or literal in ms sql server?
Is it safe to delete log files?
What the different types of Replication and why are they used?