Re: update table sequence

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: update table sequence
Дата
Msg-id 20010316135824.C11713@rice.edu
обсуждение исходный текст
Ответ на update table sequence  (e.ellenkamp@copernicus-it.nl (Egbert Ellenkamp))
Список pgsql-sql
On Fri, Mar 16, 2001 at 12:15:28PM +0000, Egbert Ellenkamp wrote:
> All,
> 
> Is there a way I can set the sequence of a table equal to highest row
> ID?
> For example something like:
> select setval('mytable_myrowid_seq',select max(myrowid) from mytable);

So close!

select setval('mytable_myrowid_seq',max(myrowid)) from mytable;

Ross


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: List Concatination
Следующее
От: Christopher Audley
Дата:
Сообщение: Oracle to PostgreSQL help: What is (+) in Oracle select?