Skip site navigation (1) Skip section navigation (2)

where in(...) order by field in(...) desc. Сорт

From: wDevil wDevil <wwdevil(at)gmail(dot)com>
To: pgsql-ru-general(at)postgresql(dot)org
Subject: where in(...) order by field in(...) desc. Сорт
Date: 2010-05-14 09:56:01
Message-ID: AANLkTinieTTg2PFDlCqkDRRM308GtXlJrIMzp8ROchZU@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-ru-general
Всем привет.

Такой вопрос, почему два запроса выдают одинаково отсортированный список:
SELECT name
FROM firm
WHERE id IN(20436598,19294320)
ORDER BY id IN(20436598,19294320) ASC;

SELECT name
FROM firm
WHERE id IN(20436598,19294320)
ORDER BY id IN(20436598,19294320) DESC;

т.е сортировка не применяется.

Responses

pgsql-ru-general by date

Next:From: dnsDate: 2010-05-14 10:02:48
Subject: Re: [pgsql-ru-general] where in(...) order by field in(...) desc. Сортировка не применяется
Previous:From: Sergey BurladyanDate: 2010-05-13 20:55:32
Subject: Re: not enough memory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group