From: Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
To: Jhonatas M. RodrÃguez <jhonatas_rod@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Continue with the original idea, about JOINS....
Date: Sat, 26 Jun 2004 05:56:40 +0100 (BST)
Message-ID: <Pine.LNX.4.58.0406260552490.1517@localhost.localdomain> (raw)
In-Reply-To: <20040625215623.54611.qmail@web14101.mail.yahoo.com>
References: <20040625215623.54611.qmail@web14101.mail.yahoo.com>
On Fri, 25 Jun 2004, [iso-8859-1] Jhonatas M. RodrÃguez wrote:
> Thank you at all for yours request
>
>
>
> Hey, i have a question about of the uses the joins
> in PostgreSQL.
>
> In SQL Server the joins i can use with the simbol(*),
> Example:. the right join is
> "table1.field1 =* table2.field2"
>
> In Oracle the joins are with the simbol (+),
> Example:. the left join is
> "table1.field1 (+)= table2.field2"
>
> What is the simbol the PostgreSQL in the use the
> JOINS?....
>
> I want to continue with the original idea, how i do a
> join without
> (table1 LEFT JOIN table2 ON (table1.field1 =
> table2.field2)
> table2 RIGHT OUTER JOIN table1 ON (table2.field2 =
> table1.field1))
>
> else with a simbol (as (*,+, anything)).
The keyword you are looking for is NATURAL, provided the joining field
has the same name in both tables (which is just good design practice).
table1 NATURAL INNER JOIN table2, for example, is equivalent to table1
INNER JOIN table2 ON (table1.table2_keyfield = table2.table2_keyfield)
Feel free to look in the documentation under 'joins' - it's well
described in there.
--
Sam Barnett-Cormack
Student of Physics & Maths | Programmer (Perl, PHP, C++, C, whatever)
Lancaster University | Administrator (PostgreSQL, Linux, whatever)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: s.barnett-cormack@lancaster.ac.uk, jhonatas_rod@yahoo.com
Subject: Re: Continue with the original idea, about JOINS....
In-Reply-To: <Pine.LNX.4.58.0406260552490.1517@localhost.localdomain>
References: <20040625215623.54611.qmail@web14101.mail.yahoo.com> <Pine.LNX.4.58.0406260552490.1517@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox