Re: Finding missing records

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Finding missing records
Дата
Msg-id 20060127140342.GA8465@webserv.wug-glas.de
обсуждение исходный текст
Ответ на Finding missing records  ("Stefano B." <stefano.bonnin@comai.to>)
Список 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 по дате отправления:

Предыдущее
От: "Stefano B."
Дата:
Сообщение: Finding missing records
Следующее
От: Pandurangan R S
Дата:
Сообщение: Re: Finding missing records