Re: Updating record drops it to the bottom

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Updating record drops it to the bottom
Дата
Msg-id m38yzgfjet.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Updating record drops it to the bottom  ("Aurangzeb M. Agha" <aagha@bigfoot.com>)
Список pgsql-general
"Aurangzeb M. Agha" <aagha@bigfoot.com> writes:

> I've noticed that whenever I update a record in the table and do a select
> * to see my change, that the updated racord has dropped to the bottom of
> the table.
>
> Is there either a) a (simple) way to keep this from happening or b)
> putting the record back where it "belongs" after an update.

Postgres (and most other SQL databases) makes no guarantee about the
order of results from a SELECT unless you use an ORDER BY clause.  So
put ORDER BY in your query if you care about the display order.

-Doug

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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Updating record drops it to the bottom
Следующее
От: "Henshall, Stuart - Design & Print"
Дата:
Сообщение: Re: Updating record drops it to the bottom