pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: José Soares <jose@sferacarta.com>
To: Brett W. McCoy <bmccoy@lan2wan.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] unmatched
Date: Fri, 11 Jun 1999 17:49:36 +0200
Message-ID: <37613010.5EBF725C@sferacarta.com> (raw)
References: <Pine.BSI.3.91.990610200217.15423B-100000@access1.lan2wan.com>

prova=> select * from  prova1;
a1
-----
delta
alpha
gamma
(3 rows)

prova=> select * from  prova2;
a2
-----
delta
gamma
(2 rows)

prova=> select * from  prova1 where a1 not in (select * from prova2);
a1
-----
alpha
(1 row)



"Brett W. McCoy" ha scritto:

> I seem to have a serious brain fart going here.   I have two tables, and
> I want to find out which rows that are in the first do not have a match
> in the second.  If I could create an explicit left join, I could do it by
> finding the rows in the second column that are NULL.  Here's what I kinda
> have, but itjust sits there and never returns anything:
>
> select count(*) from apdf
> where apdf.doc_index != ondisk.doc_index;
>
> I tried the NOT IN operator (!!=), but it didn't like that at all.  Is !=
> a valid operator?
>
> Brett W. McCoy
>                                          http://www.lan2wan.com/~bmccoy
> -----------------------------------------------------------------------
> "Biology is the only science in which multiplication means the same
> thing as division."

______________________________________________________________
PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jose'





view thread (4+ messages)

Message-ID: <37613010.5EBF725C@sferacarta.com>
Permalink:  ../37613010.5EBF725C@sferacarta.com/
Also on:    postgresql.org/message-id/37613010.5EBF725C@sferacarta.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jose@sferacarta.com, bmccoy@lan2wan.com
  Subject: Re: [SQL] unmatched
  In-Reply-To: <37613010.5EBF725C@sferacarta.com>
  References: <Pine.BSI.3.91.990610200217.15423B-100000@access1.lan2wan.com> <37613010.5EBF725C@sferacarta.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox