Re: [GENERAL] how to insert from sequence

Поиск
Список
Период
Сортировка
От Alain TESIO
Тема Re: [GENERAL] how to insert from sequence
Дата
Msg-id 19991027152233.16641.rocketmail@web308.mail.yahoo.com
обсуждение исходный текст
Список pgsql-general
> Hi all,
>
> I need help in inserting a value from sequence.  My
> code goes like this (from Java).  I do face a syntax
> level problem.
>
> statement.execute("insert into T_name (id) values (" +
> nextval('s_name') + ")");
>
> Thanks in advance for the help.

nextval is a sql function, not java so it must be sent inside
the string to execute :

statement.execute("insert into T_name (id) values
(nextval('s_name'))");


Alain


__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

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

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: [GENERAL] QUERY PLAN:
Следующее
От: "Aaron J. Seigo"
Дата:
Сообщение: Re: [GENERAL] FW: inheritance of functions