Please let me know if UNION ALL and Natural Join does the
same operation and are same...

Answer Posted / vasanth

Hi All....!

Natural join is the same as an equi join on (emp.deptno =
dept.deptno).

Natural joins may cause problems if columns are added or
renamed. Also, no more than two tables can be joined using
this method. So, it is best to avoid natural joins as far
as possible.

If you will come to UNION ALL.

UNION ALL query allows you to combine the result sets of 2
or more "select" queries. It returns all rows (even if the
row exists in more than one of the "select" statements.

Each SQL statement within the UNION ALL query must have the
same number of fields in the result sets with similar data
types.

For Example :-

select field1, field2, . field_n
from tables
UNION ALL
select field1, field2, . field_n
from tables;

Is This Answer Correct ?    18 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is trigger in sql? Explain

514


how would you enter characters as hex numbers? : Sql dba

494


What is composite primary key in sql?

495


In a distributed database system, can we execute two queries simultaneously?

544


What is foreign key and example?

485






Which kind of parameters cannot have a default value in pl sql?

570


Why select is used in sql?

490


what is the use of double ampersand (&&) in sql queries?

601


what are myisam tables? : Sql dba

525


What is information schema in sql?

550


What do you mean by “trigger” in sql?

594


what is union, minus and interact commands? : Sql dba

635


How do sql databases work?

511


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

1972


what is cross join? : Sql dba

546