From: | "Picard, Cyril" <cyril(dot)picard(at)eads-dsn(dot)com> |
---|---|
To: | "'Algirdas Sakmanas'" <asakmanas(at)grafton(dot)lt> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | RE: outer joins |
Date: | 2001-04-04 15:01:41 |
Message-ID: | B5CDCF382265D311BF33009027A8FE9401E6F370@pmrmsg.edsn.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I've read that the version 7.1 provides outer join feature. Since I did not
try it yet, I've no more information about it.
> -----Message d'origine-----
> De: Algirdas Sakmanas [SMTP:asakmanas(at)grafton(dot)lt]
> Date: mercredi 4 avril 2001 13:03
> À: pgsql-sql(at)postgresql(dot)org
> Objet: [SQL] outer joins
>
> Hi all,
>
> I'm new to postgre, I've changed my work and consequently now i'm moving
> from MS plaform.
> In MS SQL there are such constructs left or right outer join, in postgres
> there are no such thing
>
> Can You offer me strategy to make query that selects from table (a) and
> joins to it another (b)
> on e.g. a.id=b.aid but joins so that in case there is no value in table b
> NULL is left in result:
> in MS SQL i've used query:
>
> select a.id, b.name from a left outer join b on a.id=b.aid
>
> table a table b
>
> id | aid | name
> ----------- ----------------
> 1 1 | Tom
> 2 3 | Sam
>
> result:
> a.id | b.name
> ---------------------
> 1 | Tom
> 2 | NULL
>
> thank you in advance
>
> Algirdas Sakmanas
> IT manager
> +370 99 90369
> asakmanas(at)grafton(dot)lt
> Grafton Entertainment
> http://www.tvnet.lt
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-04-04 15:16:31 | Re: max( bool )? |
Previous Message | The Hermit Hacker | 2001-04-04 14:59:47 | [7.0.3] optimizing a LIKE query ... |