From: | Alexander Deruwe <a(at)deruwe(dot)be> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Linking against null-fields. |
Date: | 2001-10-09 13:24:00 |
Message-ID: | 20011009112958.074132178C9@tartarus.telenet-ops.be |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hey all,
I'm sorry if this question came up before, I couldn't find it in the
archives..
Suppose I have two tables:
table File: contains alot of fields + 'driver' field, which refers to another
table. I did not 'reference' it when creating the database because
null-values have to be possible for this field.
Now, if in this File-table the field 'driver' is not filled in, the row will
not be included in a query such as this one:
SELECT f.ID, d.NAME FROM FILE f, DRIVER d WHERE (d.ID = f.DRIVER);
However, the only reason I have this query set up as this is to get the name
of the driver easily, if one is set.
How can this be helped? Should I just get the driver ID as a field, and then
do a second query on that?
Thanks,
Alexander Deruwe
From | Date | Subject | |
---|---|---|---|
Next Message | Herb Blacker | 2001-10-09 15:09:21 | Loading current_user and current_timestamp using COPY |
Previous Message | david | 2001-10-09 12:21:29 | Re: Linking against null-fields. |