Re: question re incrementing an integer field in a table. - Mailing list pgsql-novice

From Thomas Kellerer
Subject Re: question re incrementing an integer field in a table.
Date
Msg-id jcf9oc$sph$1@dough.gmane.org
Whole thread Raw
In response to question re incrementing an integer field in a table.  (richard terry <rterry@internode.on.net>)
List 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 by date:

Previous
From: Thom Brown
Date:
Subject: Re: question re incrementing an integer field in a table.
Next
From: Aleksej Trofimov
Date:
Subject: Re: question re incrementing an integer field in a table.