Re: Help with Outer Joins
От | Josh Berkus |
---|---|
Тема | Re: Help with Outer Joins |
Дата | |
Msg-id | web-506106@davinci.ethosmedia.com обсуждение исходный текст |
Ответ на | Help with Outer Joins (Sharon Cowling <sharon.cowling@sslnz.com>) |
Список | pgsql-novice |
Sharon, > I come from an Oracle background and have noted that postgres 7.1 > supports outer joins...but I'm not sure of the syntax. Note below in > the first AND clause the (+) next to k.permit_id, I need to get the > nulls back as well as the value but I get an error when I use (+) The (+) method of performing outer joins is an Oracle proprietary deviation from the SQL92 standard. No other database uses this. The PostgreSQL, and SQL92 standard, method for performing outer joins is to use and explicit join syntax: SELECT * FROM table_a LEFT OUTER JOIN table_b ON table_a.1 = table_b.2 Please be careful using LEFT and RIGHT outer joins to get the joined tables on the correct sides! See: http://www.postgresql.org/idocs/index.php?sql-select.html for more information on JOIN syntax. see: http://techdocs.postgresql.org/ for articles on porting from Oracle to Postgres -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
В списке pgsql-novice по дате отправления: