SQL question....

Поиск
Список
Период
Сортировка
От Karl Denninger
Тема SQL question....
Дата
Msg-id 48331517.9000703@denninger.net
обсуждение исходный текст
Ответы Re: SQL question....
Re: SQL question....
Список pgsql-sql
.... assuming the following schema:

create table access (name text, address ip)

I want to construct a SELECT statement which will return ONLY tuples 
containing IP and name pairs IF there is an IP that has two or more 
NAMEs associated with it.

I've not figured out how to do this; I can get a list of all IPs and 
names ordered by IP, which I could then parse with a different program 
(e.g. "Select name, address from access order by address"), but the idea 
of course is to do it with one SELECT statement and return only rows 
that have multiple names listed for a given IP.

-- 
Karl Denninger (karl@denninger.net)
http://www.denninger.net






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

Предыдущее
От: Bryce Nesbitt
Дата:
Сообщение: Supplying a default on read, if a column does not exist in DB
Следующее
От: chester c young
Дата:
Сообщение: Re: SQL question....