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 you improve the performance of sql*loader? : aql loader
What is the purpose of a sql?
What are triggers and its uses?
how tsql statements can be written and submitted to the database engine? : Transact sql
what is a composite primary key ? : Sql dba
Explain the order of sql statement execution?
what are the properties and different types of sub-queries? : Sql dba
What is sql exception?
what is 'mysqlcheck'? : Sql dba
What is the best partition size for windows 10?
How to rename a column in the output of sql query?
What are character functions in sql?
Is it possible for a table to have more than one foreign key?
What is the difference between local and global temporary table?
how can we submit a form without a submit button? : Sql dba