Select duplicated values

Поиск
Список
Период
Сортировка
От jeffrey
Тема Select duplicated values
Дата
Msg-id b95e9cc0-87d4-4dd3-8b9a-977fbb09d5ad@o37g2000prn.googlegroups.com
обсуждение исходный текст
Ответы Re: Select duplicated values  (Edson Richter <richter@simkorp.com.br>)
Re: Select duplicated values  (Pete Yunker <peter.yunker@homejunction.com>)
Re: Select duplicated values  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
Lets say that the primary key column is A.  I am trying to select all
the rows with duplicated values in columns B, C, and D.

I am not too experienced in SQL syntax, and I've used the following:
select A from table_name where B+C+D in (select B+C+D from table_name
group by B+C+D having count(*)>1  )

I'm looking for a better way, since I am just adding the three columns
together right now.

Jeffrey

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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Selective backup script
Следующее
От:
Дата:
Сообщение: successive select statements