currval() without specifying the sequence name

Поиск
Список
Период
Сортировка
От ow
Тема currval() without specifying the sequence name
Дата
Msg-id 20040309135021.57085.qmail@web60808.mail.yahoo.com
обсуждение исходный текст
Ответы Re: currval() without specifying the sequence name  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Re: currval() without specifying the sequence name  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
Hi,

Is there a way to retrieve the current value (i.e. the last used value) of the
last used sequence without specifying the sequence name? Something like the
following:

create table ( id serial, value varchar(10));
insert into someOthertest (value) values ('100');
insert into test (value) values ('10');
insert into test (value) values ('20');

select currval() should returns 2 (the last value of the test table sequence)

Thanks




__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com


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

Предыдущее
От:
Дата:
Сообщение: Re: Trying to make efficient "all vendors who can provide all items"
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: Re: currval() without specifying the sequence name