Skip site navigation (1) Skip section navigation (2)

Left Outer join

From: Miguel Bernilla Sánchez <mbernilla(at)sedapal(dot)com(dot)pe>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Left Outer join
Date: 2006-04-18 19:36:39
Message-ID: 365264531.20060418143639@sedapal.com.pe (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
Sres. a continuación muestro un query y su resultado:

SELECT *
FROM weather LEFT OUTER JOIN cities ON (weather.city = cities.name);

     city      | temp_lo | temp_hi | prcp |    date    |     name      | location
---------------+---------+---------+------+------------+---------------+-----------
 Hayward       |      37 |      54 |      | 1994-11-29 |               |
 San Francisco |      46 |      50 | 0.25 | 1994-11-27 | San Francisco | (-194,53)
 San Francisco |      43 |      57 |    0 | 1994-11-29 | San Francisco | (-194,53)
(3 rows)

Simplificando... en ORACLE podría hacerlo así:
SELECT *
FROM weather.city = cities.name(+);

y en SQL SERVER (si no me equivoco):
SELECT *
FROM weather.city =* cities.name;

en POSTGRESQL existe alguna manera simplificada de hacerlo?

Gracias por sus respuestas...
  

-------- 
Saludos,
Miguel


Responses

pgsql-es-ayuda by date

Next:From: Alvaro HerreraDate: 2006-04-18 19:38:26
Subject: Re: Complejo
Previous:From: Lic. Martin MarquesDate: 2006-04-18 19:11:47
Subject: RE: Complejo

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group