Please let me know if UNION ALL and Natural Join does the
same operation and are same...
Answer Posted / subathra
union all: Joins the 2 selected results based on different
conditions.
Example:
select a.emp_id, b.dept_id from
emp a, dept b
where a.dept_id=b.dept_id
and a.sal < 3000
union all
select a.emp_id, b.dept_id from
emp a, dept b
where a.dept_id=b.dept_id
and a.sal > 6000
Natural Join: Establish the condition between 2 or more
tables.
Example: select a.emp_id, b.dept_id from
emp a, dept b
where a.dept_id=b.dept_id
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the different types of a subquery?
What is sqlerrm?
Mention what is the use of function "module procedure" in pl/sql?
Why self join is used in sql?
How many developers work on postgresql?
Explain the rollback statement?
What does trigger mean in slang?
What is the difference between function, procedure and package in pl/sql?
Are stored procedures faster than dynamic sql?
What is sql*loader and what is it used for? : aql loader
What are the sql commands?
Can we use threading in pl/sql?
When to use inner join and left join?
What does select * from mean in sql?
what are properties of a transaction? : Sql dba