From: | Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: conditional insert |
Date: | 2011-09-05 09:45:13 |
Message-ID: | 201109051245.13591.achill@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Στις Monday 05 September 2011 12:38:34 ο/η Pau Marc Muñoz Torres έγραψε:
> Hi follk
>
> i trying to performe a conditional insert into a table, indeed, what i'm
> trying to do is not insert a record into the table if that record exist
>
thats why primary/unique keys are for.
isolate the columns which you consider to be a correct unique key
and create a unique key on them.
thereis no notion of conditional insert that i know of.
> googleling i found something like
>
> insert into XX values (1,2,3) where not exist (select ....);
>
> but i'm having and error near where...
>
> anyone knows how do i can perfome this insert?
>
> thanks
>
> p
>
--
Achilleas Mantzios
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2011-09-05 09:48:44 | Re: conditional insert |
Previous Message | Pau Marc Muñoz Torres | 2011-09-05 09:38:34 | conditional insert |