sort by update

Поиск
Список
Период
Сортировка
От Sim Zacks
Тема sort by update
Дата
Msg-id h0qhf3$be6$1@news.hub.org
обсуждение исходный текст
Список pgsql-general
The following code works to update a table in order with a sequence.
I have tried it on a number of different types of fields.

create temporary sequence seq_1;

update tbl1 set currentsort=nextval('seq_1')
from (select tbl1id from tbl1 order by tbl1id) b
where tbl1.tbl1id=b.tbl1id;

drop sequence seq_1;

My question is, will it always work? In other words is it programmed
that way or is this an unintended feature that might stop working sometime.

Thanks
Sim

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

Предыдущее
От: David
Дата:
Сообщение: When to use cascading deletes?
Следующее
От: "Shakil Shaikh"
Дата:
Сообщение: Array Parameters in EXECUTE