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 is sql entity?
Which is faster truncate or drop?
Can you have a foreign key without a primary key?
What is indexing oracle sql?
How can I make sql query run faster?
What are the two parts of design view?
How can you fetch common records from two tables?
How do I count rows in sql?
What does fetching a cursor do?
What are tuples in sql?
What is the best free sql database?
What are synonyms in sql?
How to Execute a Package in PL/SQL.?
What is sorting in sql?
How do I view tables in mysql?