Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between join and union.

Answer Posted / tanu

UNION: Union Combines results of all select statements,
displaying duplicate rows only one time in the answerset.

Rules for usage:
1. All select clauses must have same number of expressions.
2. Corresponding expressions must have compatible domains.

First SELECT statement:
->Determines output format.
->Determines output title.

Last SELECT statement:
->Contains ORDER BY for the entire result, if required.

EXAMPLE:
SELECT first_name
,last_name
,'employee' (TITLE 'employee//type')
FROM employee
WHERE manager_employee_number = 1019
UNION
SELECT first_name
,last_name
,' manager '
FROM employee
WHERE employee_number = 1019
ORDER BY 2
;

RESULT:

first_name last_name employee_type
Carol Kanieski employee
Ron Kubic manager
John Stein employee

JOIN:
Join is a technique for accessing data from more than one
table in a single answerset. Each row in the answerset may
contain data from columns of more than one table. Tables
are joined on columns sharing common domain.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to combine two stored procedures in sql?

1118


Can we perform dml in function?

1013


Can we create index on primary key?

913


What is rollback?

1033


Explain what is a subquery ?

1119


Sql technical questions

1199


How many types of tables are there?

899


State few characteristics of pl/sql?

928


How to place comments in pl/sql?

1095


What is the difference between mdf and ndf files?

1060


what is online transaction processing (oltp)? : Sql dba

933


What is the difference between sql and t sql?

963


What is a string data type in sql?

956


how to add a new column to an existing table in mysql? : Sql dba

1000


How can you tell the difference between an index and a view?

869