What is the difference between join and union.
Answer Posted / somashekhar m
Union : The union operator combines the results of two or
more queries into a single result set. But no.of columns
must match in both/all the queries (and also the order)
which are used for union.
Union -- returns with no duplicate rows
Union all -- retruns with duplicate rows (No. of rows
returned = No. of rows in Query1 + No. of rows in Query 2)
Union is a set operator.
You cannot use the union operator within a create view
statement.
You cannot use the union operator on text and image columns.
You cannot use the for browse clause in statements
involving the union operator.
Joins: Joins are used to extract information from more than
one table based on the related column/coloums (PK and RFK)
any no. of rows can be retrived based on matching matching
colums. Different types of joins are Inner join=equi join=
join, outer join(Right outer join/right join, Left outer
join/ left join), Cross join, and full outer join/outer join
Is This Answer Correct ? | 139 Yes | 20 No |
Post New Answer View All Answers
Which join condition can be specified using on clause?
Explain how to use transactions efficiently : transact sql
How do I view stored procedures?
What is the use of prepared statement?
What is pls integer?
What is a left inner join?
What is a delimiter in sas?
Is pl sql better than sql?
What is clustered index sql?
Is sql developer case sensitive?
What is trigger explain with example?
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
What can I use instead of union in sql?
What are expressions?
Explain the types of joins in sql?