Outer join of more than two tables

by Irina 30. March 2009 05:46

Multi-table joins have the following requirements:

  • Only two tables may be joined at a time
  • Each Join must have an associated
  • On clause placement must associate the two tables being joined

 

Example

 Select information.customer_id

          customer_name,

          custom_adress

from customer_information information right outer join

campaign_new_year campaign

on   information.customer_id = campaign.customer_id

left outer join job j

on campaign.customer_id = j.customer_id

 

The placement on the ON clause in the select is important. The rules are:

  • The first On clause (from left to right) is evaluated first
  • AN On clause applies to immediately preceding operations

 

When defining 3 or more tables in outer join operations you must consider the results of each separated join operation as a derived or temporary table

 

Example:  

 

Select * from

  (

(Select information.customer_id

          customer_name,

          custom_adress

from customer_information information right outer join

campaign_new_year campaign

on  information.customer_id = campaign.customer_id) result

left outer join job j

on result.customer_id = j.customer_id) a

 

 

Related posts

Comments

11/4/2011 12:02:32 AM

It`s much easier following your example

cheap cv

11/11/2011 10:15:47 PM

Hey Irina, must say you have put it across the things that are important in a very nice manner.
Thank you.
Chris Harris

dissertation writers

11/29/2011 10:48:02 AM

Have you ever wondered the importance of SEO services India? SEO (Search Engine Optimization) services can be described as a procedure helpful to get a website’s online recognition. Website owners and companies look for their websites’ rankings on the popular search engines so that they can get more traffic and thus earn huge money from the business.

Have you ever wondered the importance of SEO services India? SEO (Search Engine Optimization) services can be described as a procedure helpful to get a website’s online recognition. Website owners and companies look for their websites’ rankings on the popular search engines so that they can get more traffic and thus earn huge money from the business.

http://www.seosoftwareservices.com

SEO Company India

12/2/2011 10:30:09 PM

i like it irina that is helpful post . Its help me during work

essay help

12/12/2011 5:25:42 AM

This information can be useful for many people. They can use it in their work.

essay writing

12/21/2011 11:41:09 PM

Great, I like it very much, but if more pictures will be better, looking forward to your next post, I hope can read again other article like this post

miu miu replica handbags

12/22/2011 5:21:26 AM

Very useful for me I will bookmark this for my future needed. thanks for a great source.Of the tons of comments on your posts, I think I'm not the only one who enjoys reading your website. Carry on the excellent work.

interior design

12/26/2011 12:57:17 AM

It's very difficult to do this work alone. You can make a lot of mistakes.

term paper writer

12/27/2011 9:48:11 AM

Very nice and informative post. Keep up the good work. Please remember that i m waiting for your next awesome post...

Bandages

1/1/2012 7:17:38 AM

This website Is Definitely wonderful plus amazing information could there really be and hunting so interesting.. I think good to always be here.. Keep sharing good stuff with good friends.. Thanks for the purpose of sharing.

flatshare London

1/5/2012 11:15:33 PM

This is very interesting and useful information. People can use it in their work.

dissertation service

Add comment


(will show your Gravatar icon)  





Live preview

2/5/2012 9:18:00 PM

 

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2012

    Sign in

    eXTReMe Tracker