What is the difference between join and union.
Answer Posted / lalitha
join:
The SQL JOIN clause is used whenever we have to select data
from 2 or more tables.
To be able to use SQL JOIN clause to extract data from 2
(or more) tables, we need a relationship between certain
columns in these tables.
union:
The purpose of the SQL UNION command is to combine the
results of two queries together. In this respect, UNION is
somewhat similar to JOIN in that they are both used to
related information from multiple tables. One restriction
of UNION is that all corresponding columns need to be of
the same data type. Also, when using UNION, only distinct
values are selected (similar to SELECT DISTINCT).
| Is This Answer Correct ? | 35 Yes | 11 No |
Post New Answer View All Answers
What is cte sql?
What does subquery mean in sql?
how to dump a table to a file with 'mysqldump'? : Sql dba
what is rollback? : Sql dba
How to take user input in pl sql?
Is sql a scripting language?
How do I create a sql script?
What does inner join mean?
Why do we use procedures in pl sql?
What is pl sql commands?
Does asenumerable execute the query?
how do you control the max size of a heap table? : Sql dba
what is union, minus and interact commands? : Sql dba
What is pl sql record in oracle?
Explain two easy sql optimizations.