Re: ORDER BY results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ORDER BY results
Дата
Msg-id 29176.1127402815@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ORDER BY results  (Howard Cole <howardnews@selestial.com>)
Список pgsql-general
Howard Cole <howardnews@selestial.com> writes:
> I have a query which presents results sorted using the SQL  "ORDER BY...
> LIMIT". Now my question is...  if the column that the order refers to
> has some repeated data, will the order of results always be the same?

No.  You need to add more columns to the ORDER BY clause to ensure a
unique ordering, if you want to be sure of that.

(For sufficiently small values of "always", such as if the table hasn't
been updated in between, the results may appear stable ... but it's not
guaranteed.)

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: ORDER BY results
Следующее
От: Tom Lane
Дата:
Сообщение: Re: wrong protocol sequence?