Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Joins in ORACLE
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
![]() |
![]() |