What is the difference between join and union.
Answer Posted / uchit shah
A Union and Join are similar in that they both are combining
two tables to form another table. However they do this
combining in different ways. The geometry is different.
Lets say for Table A and Table B
Union : -
|A|
-
|B|
-
Join : - -
| A | B |
- -
Union :
(1) In Union Two Rows of one table must fit onto the other
table. The Number of columns in the result table is the same
as the number in both tables. No new Columns are added.
(2) Maximum Number of rows = Sum of Number of rows in the
two tables.
Join :
(1) In Join the rows of one table may be different from the
rows of another table. The result table can contain columns
from both the first and second tables. It can contain all
the columns of first table and all the columns of second tables.
(2) Maximum Number of rows = Product of rows in two tables.
| Is This Answer Correct ? | 25 Yes | 3 No |
Post New Answer View All Answers
How can check sql version from command line?
What is scope of pl sql developer in future?
What is the current version of sql?
How to create your own reports in sql developer?
Who is the owner of mysql database?
What is consistency?
what is a control file ? : Sql dba
What is the requirement of self-join?
Which command is used to call a stored procedure?
What is varchar data type in sql?
When should I use nosql database?
What is sql and its types?
What are the 3 modes of parameter?
how many columns can be used for creating index? : Sql dba
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?