Re: very basic SQL question

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: very basic SQL question
Дата
Msg-id 20101123123458.GH6225@samason.me.uk
обсуждение исходный текст
Ответ на very basic SQL question  (Dan Kortschak <dan.kortschak@adelaide.edu.au>)
Список pgsql-general
On Tue, Nov 23, 2010 at 02:09:19PM +1030, Dan Kortschak wrote:
> I want to be able to insert,
> uniquely, biological sequences into a table returning the sequence id -
> this part is fine. However, if the sequence already exists in the table
> I want to return to id.

The term you're looking for is "UPSERT", the following looks relevant:

  http://stackoverflow.com/questions/1109061/insert-on-duplicate-update-postgresql

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Robert Gravsjö
Дата:
Сообщение: Re: Debug advice when postgres connection maxing out
Следующее
От: Vick Khera
Дата:
Сообщение: Re: Connection pool