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

Problems with joining two tables

From: "Rudolph, Michael" <Michael(dot)Rudolph(at)telekom(dot)de>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Problems with joining two tables
Date: 2000-04-19 09:17:26
Message-ID: EB8366869DABD2119F3200A0C9F02CC80165449B@U8P27 (view raw or flat)
Thread:
Lists: pgsql-sql
Hi,

I have two tables, the first one has one column as a reference to the index of the second. Not every row in the first table has a reference to the second table. I now want to make a query to get all information of the first table and, if there is a reference, the corresponding information of the second table in that row. In another programming language I would just make an if-clause but how can I do this in SQL?

Thanks for your help

Michael

Responses

pgsql-sql by date

Next:From: Graham VickrageDate: 2000-04-19 11:47:03
Subject: Query Times
Previous:From: Manuel LemosDate: 2000-04-19 07:47:06
Subject: Re: Connecting website with SQL-database.....

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