pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to... in update
2+ messages / 2 participants
[nested] [flat]
* How to... in update
@ 2003-03-21 10:17 Marc Soler <msoler@el-valles.com>
0 siblings, 1 reply; 2+ messages in thread
From: Marc Soler @ 2003-03-21 10:17 UTC (permalink / raw)
To: pgsql-admin
Hi all,
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
Thanks.
--
Marc Soler
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How to... in update
@ 2003-03-21 10:44 A.Bhuvaneswaran <bhuvansql@myrealbox.com>
parent: Marc Soler <msoler@el-valles.com>
0 siblings, 0 replies; 2+ messages in thread
From: A.Bhuvaneswaran @ 2003-03-21 10:44 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-03-21 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 10:17 How to... in update Marc Soler <msoler@el-valles.com>
2003-03-21 10:44 ` A.Bhuvaneswaran <bhuvansql@myrealbox.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox