Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Joins in ORACLE

Re: Joins in ORACLE

From: Steve Bell <swayne.bell_at_sympatico.ca>
Date: Mon, 26 Mar 2001 15:01:46 GMT
Message-ID: <3ABF5748.3047AC70@sympatico.ca>

Hi Chris,

The very short answer to this.......
In a normailized relational database there is often the requirement to SELECT information from more than one table at a time to get meaningful results (for example, if EMPLOYEE is a child table of DEPARTMENT you may simultaneously need to select columns from both tables to determine the name of the department corresponding to each employee). To do this you include in your WHERE clause a condition similar in form to:
where childtable.foreignkey = parenttable.primarykey

This syntax, known as an equijoin, will only return rows where a record exists in both tables.
There are other kinds of joins, but this is the first you will encounter.

If you're interested you can pick up almost any book on SQL and it should give you examples of the different kinds. Try to find one that uses the syntax that Oracle uses; they'll usually say.

Hope this can get you started,
Steve

Chris wrote:

> Hi everyone, I'm at school currently learning Oracle
> as one of my subjects. I recently heard a few people
> speaking about Joins and since I will be covering them
> next term, I'd like to get a head start on understanding
> them. My question is, can someone please explain the
> concept of joins or point me in the right direction, or even
> a small sample piece of code would be great.
>
> Any help appreciated.
>
> Thank You
> Chris Val
  Received on Mon Mar 26 2001 - 09:01:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US