[PERFORM] Auto generate number in Postgres-9.1.

Поиск
Список
Период
Сортировка
От Dinesh Chandra 12108
Тема [PERFORM] Auto generate number in Postgres-9.1.
Дата
Msg-id ab77f3e1c16540a09002740e283529c5@cyient.com
обсуждение исходный текст
Ответы Re: [PERFORM] Auto generate number in Postgres-9.1.
Список pgsql-performance

Dear expert,

 

I have to add one column  “ID” in postgres table which will generate Auto Incremented number .

 

Example:

Suppose I have five records and if I insert 1 new record It should auto generate 6.

If I truncate the same table and then again insert rows should start with 1 in “ID” column.

 

Regards,

Dinesh Chandra

|Database administrator (Oracle/PostgreSQL)| Cyient Ltd. Noida.




DISCLAIMER:

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Check all attachments for viruses before opening them. All views or opinions presented in this e-mail are those of the author and may not reflect the opinion of Cyient or those of our affiliates.

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: [PERFORM] Please help with a slow query: there are millions ofrecords, what can we do?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: [PERFORM] Auto generate number in Postgres-9.1.