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

Create or replace row in table

From: "Charles Holleran " <scorpdaddy(at)hotmail(dot)com>
To: "pgsql-novice(at)postgresql(dot)org " <pgsql-novice(at)postgresql(dot)org>
Subject: Create or replace row in table
Date: 2010-09-02 01:37:44
Message-ID: BAY126-DS15221FA4E1828549ADF497CE8C0@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Please pardon the total nubie question. 

There is a nice syntax for functions,  "CREATE OR REPLACE FUNCTION xyz ..."

What is the best syntax to create or replace a row in a table?

Specifically: Update row in table t if row exists in table t else insert row in table t with source rows from temporary table s of same type as t. 


pgsql-novice by date

Next:From: Mladen GogalaDate: 2010-09-02 03:53:52
Subject: Re: Create or replace row in table
Previous:From: Chris BrowneDate: 2010-09-01 22:19:51
Subject: Re: Installing temporal "period" data type and support functions

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