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 'trigger' in sql? : Sql dba
Why is nosql good?
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
how to run 'mysql' commands from a batch file? : Sql dba
Why are indexes and views important to an organization?
What is sqlerrm?
What is the purpose of cursors in pl/sql?
What is sql select statement?
what is an alias command? : Sql dba
How to rename a table?
what are properties of a transaction? : Sql dba
Is sql developer case sensitive?
What does inner join mean?
what are the differences between char and nchar? : Sql dba
What is difference between nchar and nvarchar?