What is the difference between join and union.

Answer Posted / somashekhar m

Union : The union operator combines the results of two or
more queries into a single result set. But no.of columns
must match in both/all the queries (and also the order)
which are used for union.
Union -- returns with no duplicate rows
Union all -- retruns with duplicate rows (No. of rows
returned = No. of rows in Query1 + No. of rows in Query 2)
Union is a set operator.
You cannot use the union operator within a create view
statement.

You cannot use the union operator on text and image columns.

You cannot use the for browse clause in statements
involving the union operator.

Joins: Joins are used to extract information from more than
one table based on the related column/coloums (PK and RFK)
any no. of rows can be retrived based on matching matching
colums. Different types of joins are Inner join=equi join=
join, outer join(Right outer join/right join, Left outer
join/ left join), Cross join, and full outer join/outer join

Is This Answer Correct ?    139 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many triggers are allowed in mysql table? : Sql dba

556


What is the difference between syntax error and runtime error?

612


what is text? : Sql dba

552


What is nosql vs sql?

563


What is the best sql course?

532






What is use of package in pl sql?

530


What is difference between sql and mysql?

528


What are user defined functions?

577


what are all the different types of indexes? : Sql dba

526


How do you use a while loop in pl sql?

534


What is audit logout in sql profiler?

585


What are different categories of sql commands?

631


Is sql a microsoft product?

496


Differentiate between sga and pga.

665


What is sql trigger example?

535