Re: question re incrementing an integer field in a table.

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: question re incrementing an integer field in a table.
Дата
Msg-id jcf9oc$sph$1@dough.gmane.org
обсуждение исходный текст
Ответ на question re incrementing an integer field in a table.  (richard terry <rterry@internode.on.net>)
Список pgsql-novice
richard terry, 16.12.2011 11:57:
> Is there a simple way to increment the value of an integer field in a table in
> sql  without reading the fields value  adding 1 and re-saving? (the field is not
> a primary key or any other sort of foreign key)
>

Not sure I understand you question, but are you maybe looking for:

update the_table
   set the_column = the_column + 1;


Thomas

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: question re incrementing an integer field in a table.
Следующее
От: Aleksej Trofimov
Дата:
Сообщение: Re: question re incrementing an integer field in a table.