Testing for existence of a record before insert

Поиск
Список
Период
Сортировка
От Rob Anderson
Тема Testing for existence of a record before insert
Дата
Msg-id FHEPJNONMOLHMPDJDOCMOEPHFGAA.roba@bml.uk.com
обсуждение исходный текст
Ответы Re: Testing for existence of a record before insert
Список pgsql-admin
I am trying to find a way of performing something similar to the SQL-Server SQL of
 
IF NOT EXISTS (SELECT id FROM a_table WHERE id='akey')
THEN INSERT INTO a_table (id, name) values ('akey', 'adetails');
 
 

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Slow Foreign Key
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Testing for existence of a record before insert