Re: conditional insert

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: conditional insert
Дата
Msg-id j4261h$lj8$1@dough.gmane.org
обсуждение исходный текст
Ответ на conditional insert  (Pau Marc Muñoz Torres <paumarc@gmail.com>)
Ответы Re: conditional insert
Список pgsql-general
Pau Marc Muñoz Torres, 05.09.2011 11:38:
> 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
thetable if that record exist 
>
> 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?

INSERT INTO xxx
SELECT 1,2,3
WHERE NOT EXISTS (SELECT ...)

Regards
Thomas

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: conditional insert
Следующее
От: Sim Zacks
Дата:
Сообщение: Re: conditional insert