| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера