removing duplicates - sql

Поиск
Список
Период
Сортировка
От Johnson, Shaunn
Тема removing duplicates - sql
Дата
Msg-id 73309C2FDD95D11192E60008C7B1D5BB04C73E56@snt452.corp.bcbsm.com
обсуждение исходный текст
Ответы Re: removing duplicates - sql  (Tommi Maekitalo <t.maekitalo@epgmbh.de>)
Список pgsql-general
Howdy:
 
I have a table that has a primary key on it.  Somewhere in
the table, it seems to have a few duplicate records in it.
I'm trying to weed out the duplicates, but am having problems
with the sql.
 
To start, I create a temp table and just get the
distinct records I need.
 
[code]
select distinct
name,
addr1,
phone,
city
into temp_table
from emp_table ;
[/snip code]
 
I see by the count of the two tables there are
about 50 or so records that are in one and
not in the temp_table.  How do I use the
where clause to figure out where the duplicates
are?
 
Suggestions?  TIA!
 
-X

В списке pgsql-general по дате отправления:

Предыдущее
От: Darren Ferguson
Дата:
Сообщение: Re: Can't get postgresql to work
Следующее
От: "Ray Hunter"
Дата:
Сообщение: Primary Keys