Re: is this possible? it should be!

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: is this possible? it should be!
Дата
Msg-id 20010820074456.A28452@wolff.to
обсуждение исходный текст
Ответ на is this possible? it should be!  (newsreader@mediaone.net)
Ответы Re: is this possible? it should be!  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
On Sun, Aug 19, 2001 at 01:49:00PM -0400,
  newsreader@mediaone.net wrote:
> Hello
>
> I have statements (highly simplified just to get
> the point across) like
>
> select a,b,c from a where d=2 order by e limit 10;
>
> Now I think that because of "order by" the above query
> already "knows" the result of the below query
>
> select count(*) from a where d=2;
>
> The point is that I want to know the total number
> of matches and I also want to use "limit".  And
> I don't want to do two queries.

Shouldn't:

select a,b,c, count(*) from a where d=2 order by e limit 10;


do what you want?

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

Предыдущее
От: "Colin 't Hart"
Дата:
Сообщение: Re: Finding database names for overnight vacuum
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: is this possible? it should be!