Re: How to... in update

From: "A(dot)Bhuvaneswaran" <bhuvansql(at)myrealbox(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to... in update
Date: 2003-03-21 10:44:19
Message-ID: Pine.LNX.4.44.0303211613050.2317-100000@Bhuvan.bksys.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> It's possible in postgres to increment a row in a UPDATE command.
>
> something like this: UPDATE table set col_name = 'foo', col_name2 ++ WHERE
> condition

UPDATE table set col_name = 'foo', col_name2 = col_name2 + 1 WHERE
condition

Is the above your requirement? If yes, this is how it can be done.

regards,
bhuvaneswaran

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Victor Yegorov 2003-03-21 14:01:45 psql invokation
Previous Message Nigel Bishop 2003-03-21 10:21:26 Any Monitoring Tools for Postgres?