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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: INSERT OU UPDATE WITHOUT SELECT?



On 5/30/06, Waldomiro <waldomiro(at)shx(dot)com(dot)br> wrote:
 Is there a command to Insert a record If It does not exists and a update if
It exists?

Sure, it's called MERGE.  See http://en.wikipedia.org/wiki/Merge_%28SQL%29

 I mean the postgres should test if a record exist before insert and if It
exist then the postgres must do an update instead an insert.

PostgreSQL does not support MERGE at the moment, sorry.

--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 2nd Floor            | jharris(at)enterprisedb(dot)com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2007 PostgreSQL Global Development Group