Skip site navigation (1) Skip section navigation (2)

question re incrementing an integer field in a table.

From: richard terry <rterry(at)internode(dot)on(dot)net>
To: "'PostgreSQL Novice'" <pgsql-novice(at)postgresql(dot)org>
Subject: question re incrementing an integer field in a table.
Date: 2011-12-16 10:57:40
Message-ID: 201112162157.40818.rterry@internode.on.net (view raw or flat)
Thread:
Lists: pgsql-novice
Hope this question isn't too idiotic and makes sense.


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)

regards

richard


Responses

pgsql-novice by date

Next:From: Thom BrownDate: 2011-12-16 11:09:05
Subject: Re: question re incrementing an integer field in a table.
Previous:From: Jean-Yves F. BarbierDate: 2011-12-15 13:47:20
Subject: Re: Rounding result of expression in SELECT ..AS..

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group