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

'UPDATE OR INSERT' command

From: Jeff Kowalczyk <jtk(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: 'UPDATE OR INSERT' command
Date: 2004-07-15 18:20:57
Message-ID: pan.2004.07.15.18.20.54.67962@yahoo.com (view raw or flat)
Thread:
Lists: pgsql-sql
Is there a postgresql SQL idiom to perform an UPDATE, which becomes an
INSERT if the primary key does not exist?

I'm not sure I *should* use it in my application, I just want to know if
it can be done. Thanks.


Responses

pgsql-sql by date

Next:From: Luis SousaDate: 2004-07-16 08:45:24
Subject: Problem in age on a dates interval
Previous:From: Bruno Wolff IIIDate: 2004-07-15 17:53:18
Subject: Re: 'UPDATE OR INSERT' command

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