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

Re: SQL( "if ...exists...),how to do it in the PostgreSQL?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Eric <e-lz(at)263(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL( "if ...exists...),how to do it in the PostgreSQL?
Date: 2001-06-06 14:48:34
Message-ID: Pine.LNX.4.30.0106061648090.757-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Eric writes:

>    I can realize this function in the SYBase,but How can i do it in the PostgreSQL?
> /****SQL***/
> if not exists(select id from test) insert into test(id) values (280);
> /*********/

Write a function in PL/pgSQL.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2001-06-06 14:52:58
Subject: Re: vacuumdb -a -z hangs
Previous:From: Peter EisentrautDate: 2001-06-06 14:45:46
Subject: Re: psql bug or feature?

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