Обсуждение: record id

Поиск
Список
Период
Сортировка

record id

От
"stephen"
Дата:

I remember with oracle there was a self numbering record id field which we often used to cross reference tables.  Is there something like this with postgresql?

 

Stephen Choularton

0413 545 182

02 9999 2226

 

Re: record id

От
Tom Lane
Дата:
"stephen" <mail@xesoftware.com.au> writes:
> I remember with oracle there was a self numbering record id field which
> we often used to cross reference tables.  Is there something like this
> with postgresql?

You want a serial column (or maybe just a sequence).  See the docs.

            regards, tom lane

Re: record id

От
Frank Bax
Дата:
At 06:48 PM 4/26/07, stephen wrote:

>I remember with oracle there was a self numbering record id field which we
>often used to cross reference tables.  Is there something like this with
>postgresql?


http://www.postgresql.org/docs/faqs.FAQ.html

Use "serial".  Read 4.12; then 4.11.x