Re: Finding missing records - Mailing list pgsql-general

From A. Kretschmer
Subject Re: Finding missing records
Date
Msg-id 20060127140342.GA8465@webserv.wug-glas.de
Whole thread Raw
In response to Finding missing records  ("Stefano B." <stefano.bonnin@comai.to>)
List pgsql-general
am  27.01.2006, um 14:59:47 +0100 mailte Stefano B. folgendes:
> How can I find the difference between the two tables?
> table1 has 10000 records
> table2 has  9900 records (these records are in table1 as well)
>
> I'd like to find 100 missing records.
> I have try this query
>
> select f1,f2,f3,f4 from table1 where (f1,f2,f3,f4) NOT IN (select f1,f2,f3,f4 from table2)

select f1,f2,f3,f4 from table1 except select f1,f2,f3,f4 from table2;


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-general by date:

Previous
From: "Stefano B."
Date:
Subject: Finding missing records
Next
From: Pandurangan R S
Date:
Subject: Re: Finding missing records