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

Поиск
Список
Период
Сортировка
От Robert Forsman
Тема Re: SQL( "if ...exists...),how to do it in the PostgreSQL?
Дата
Msg-id 200106062232.SAA11021@nile.purplefrog.com
обсуждение исходный текст
Ответ на SQL( "if ...exists...),how to do it in the PostgreSQL?  ("Eric" <e-lz@263.net>)
Список 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);
> /*********/

I don't know if this is SQL92, but 

insert into test(id) select 280 where not exists(select id from test);


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