Re: if exists...does it exists for insert statments? - Mailing list pgsql-general

From Pavel Stehule
Subject Re: if exists...does it exists for insert statments?
Date
Msg-id 162867790712110902o10efbfcasd2873ef206bd477e@mail.gmail.com
Whole thread Raw
In response to if exists...does it exists for insert statments?  ("Pau Marc Munoz Torres" <paumarc@gmail.com>)
List pgsql-general
Hello

On 11/12/2007, Pau Marc Munoz Torres <paumarc@gmail.com> wrote:
> could i use a sentence similar to the mysql sentence
>
> insert if not exist into SP values ('cesp','sp');
>

insert into sp
  select 'cesp','sp'
  except
  select * from SP;

Regards
Pavel Stehule

> in postgresql?
>
> pau
>
>
> --
> Pau Marc Muñoz Torres
>
> Laboratori de Biologia Computacional
> Institut de  Biotecnologia   i Biomedicina Vicent Villar
>
> Universitat Autonoma de Barcelona
> E-08193 Bellaterra (Barcelona)
>
> telèfon: 93 5812807
> Email : paumarc.munoz@bioinf.uab.cat

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: top posting (was: Hijack!)
Next
From: "Joshua D. Drake"
Date:
Subject: Re: psql batch file question