Re: Stored Functions

Поиск
Список
Период
Сортировка
От Anders Hermansen
Тема Re: Stored Functions
Дата
Msg-id 20030829085119.GC32413@online.no
обсуждение исходный текст
Ответ на Stored Functions  ("Yolanda Phillips" <yphillips@dlkconsulting.co.za>)
Список pgsql-jdbc
* Yolanda Phillips (yphillips@dlkconsulting.co.za) wrote:
> I'm wanting to do an insert, then if it was successfull the function should
> return the id. This id is using a sequence.nextval(). How do I return the
> new id?

After the insert statement, run a new statement:
SELECT curval('sequencename')

This statement will return the id.


Hope this helps,
Anders

--
Anders Hermansen
YoYo Mobile as

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

Предыдущее
От: "Yolanda Phillips"
Дата:
Сообщение: Stored Functions
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Stored Functions