Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

difference between Union All and full outer join

This is a discussion on difference between Union All and full outer join within the MY SQL forums, part of the Databases category; Hi can any one tell me the difference between "union all" and "full outer join" thanks in advance...

Go Back   Geeks Talk > Databases > MY SQL
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 03-28-2007
Expert Member
 
Join Date: Apr 2006
Location: India, Hyderabad
Posts: 133
Thanks: 21
Thanked 50 Times in 18 Posts
bvani will become famous soon enough
difference between Union All and full outer join

Hi

can any one tell me the difference between "union all" and "full outer join"

thanks in advance
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-28-2007
Expert Member
 
Join Date: Dec 2006
Location: Chennai
Posts: 210
Thanks: 2
Thanked 17 Times in 15 Posts
Barbie is on a distinguished road
Re: difference between Union All and full outer join

The output record set in union all contains same number of columns as in the input tables. But it concatenates all the records of both the input tables in the output. Both the input tables should have the same number of columns and same data types for those columns.

But the full outer join concatenates the columns in both the table. No need for the input tables to have same number of records.
Reply With Quote
The Following User Says Thank You to Barbie For This Useful Post:
  #3 (permalink)  
Old 03-28-2007
Expert Member
 
Join Date: Apr 2006
Location: India, Hyderabad
Posts: 133
Thanks: 21
Thanked 50 Times in 18 Posts
bvani will become famous soon enough
Re: difference between Union All and full outer join

Hi Barbie

That was a significant input thank you
Reply With Quote
  #4 (permalink)  
Old 12-13-2007
Junior Member
 
Join Date: Dec 2007
Location: hyderabad
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
chskumar is on a distinguished road
Wink Re: difference between Union All and full outer join

UNION ALL: there is restriction for set operators, i.e. the columns in query 1 must match the columns in query2 in data type,order and number.

some e.g.:
display those who are emp as well managers(INTERSECT)
display those who are not managers (MINUS)
display those depts which do not have emp(MINUS)
dispaly those depts which have emp(INTERSECT) try these......


OUTER-JOIN: used on those tables that keep common columns just like EQUI-JION. but, the o/p will display some extra information which is available in only one of the two tables......

E.G.:
display emp details along with coressponding department details and also display that department details which there are no emp....

than q
sateesh
Reply With Quote
  #5 (permalink)  
Old 09-24-2008
Junior Member
 
Join Date: Oct 2007
Location: INDIA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ksrinat is on a distinguished road
Re: difference between Union All and full outer join

I am taking NT Backup for SAP in SQL Backend. But Backup time is less than one minute and shows the result of backup as OK. Is it correct or wrong .
Reply With Quote
  #6 (permalink)  
Old 10-23-2008
Junior Member
 
Join Date: Oct 2008
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
madhavi Krishnarajpet is on a distinguished road
Re: difference between Union All and full outer join

Full Outer join:
a full outer join combines the results of both left and right outer joins. The joined table will contain all records from both tables, and fill in nulls for missing matches on either side

example is:
select * from employee full outer join department on employee.departmentid = department.departmentid;

Union All:
The union all operator is used to combine the result-set of two or more select statements and allows duplicate values.

Example is: select * from employees_norway union all select * from employees_usa;
Reply With Quote
Reply

  Geeks Talk > Databases > MY SQL

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Meaning of Join and Link JobHelper Seibel 2 05-08-2007 06:36 AM
Which to use - A join or a look-up infinity Data Warehousing 0 02-28-2007 12:32 PM
life is full of Drill throughs,prompts and filters Hamid Get Together 0 02-14-2007 07:34 PM
Using Join bvani Oracle 6 02-12-2007 02:30 PM
IS there a Command to get a full report of memory in Linux? timmy Unix/Linux 3 07-12-2006 03:19 PM


All times are GMT -4. The time now is 02:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved