Re: count() for a select statement?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: count() for a select statement?
Дата
Msg-id 20021001110711.D95989-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на count() for a select statement?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-general
On Wed, 2 Oct 2002, Jean-Christian Imbeault wrote:

> Is there an efficient way to get a count of the number of rows returned
> by this kind of query?
>
> select id from products where name ILIKE 'TNT' UNION select id from
> products where name ILIKE 'ATOM' UNION select id from products where
> name ILIKE 'BOB'

Probably "select count(*) from (select id from ... ) as t"
should work.


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: cluster replication with intermezzo
Следующее
От: snpe
Дата:
Сообщение: Re: count() for a select statement?