Received: from tartarus.telenet-ops.be (tartarus.telenet-ops.be [195.130.132.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f99BU1n34107 for ; Tue, 9 Oct 2001 07:30:01 -0400 (EDT) (envelope-from a@deruwe.be) Received: from there (D5E02B88.kabel.telenet.be [213.224.43.136]) by tartarus.telenet-ops.be (Postfix) with SMTP id 074132178C9 for ; Tue, 9 Oct 2001 13:29:58 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" From: Alexander Deruwe Reply-To: a@deruwe.be To: pgsql-sql@postgresql.org Subject: Linking against null-fields. Date: Tue, 9 Oct 2001 13:24:00 +0000 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011009112958.074132178C9@tartarus.telenet-ops.be> X-Archive-Number: 200110/132 X-Sequence-Number: 5087 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