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
How many sql databases can you have on one server?
Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?
what is log shipping? : Sql dba
How to add new employee details in an employee_details table with the following details
Why sql query is slow?
what is view? : Sql dba
does sql support programming? : Sql dba
Is ms sql is free?
What is procedure and function?
What is the use of index in hive?
What is clause in sql?
How can I speed up sql query?
Is delete faster than truncate?
What is flag in sql?
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?