Re: [Re: PRIMARY KEY]

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: [Re: PRIMARY KEY]
Дата
Msg-id 20070309150332.GC23704@wolff.to
обсуждение исходный текст
Ответ на [Re: PRIMARY KEY]  (Phillip Smith <fukawi2@iinet.net.au>)
Ответы Re: [Re: PRIMARY KEY]
Список pgsql-sql
On Wed, Mar 07, 2007 at 23:20:12 +1100, Phillip Smith <fukawi2@iinet.net.au> wrote:
> If you actually need to know the value of N_GEN in your ASP application,
> you will need to query the database first and select the NEXTVAL from
> the sequence that the "serial" data type will create, then use that
> returned value in your insert - ie, DON'T exclude it from the insert,
> otherwise it will default to NEXTVAL again and return a different value.

In 8.2, you can also use the RETURNING clause to get those values.


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: View Vs. Table
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: index not being used. Why?