Serial types

Поиск
Список
Период
Сортировка
От Sonia Sanchez Diaz
Тема Serial types
Дата
Msg-id 59376.132.248.225.24.1013813567.squirrel@entren.dgsca.unam.mx
обсуждение исходный текст
Ответы Re: Serial types
Список pgsql-general
How Can I restart the values of a serial type field...??

I mean, I have a table with id_user defined as serial type, if a delete the
data from this table and insert new data the field id_user will start the
counter from the last record it had saved...

So... I want the new records insert into the table begins again with 1.

I used alter table <table> alter id_user set default 1;

But, only I could insert one record with number 1.

Thanks for your answers.

Sonny

--
Los amigos verdaderos se hieren con verdades,
para no perderse con mentiras
---



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

Предыдущее
От: Sean Chittenden
Дата:
Сообщение: Powered by PostgreSQL logos/icons/images...
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: Powered by PostgreSQL logos/icons/images...