create table autoincrement

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

create table autoincrement

От:
Jose Manuel Lorenzo Lopez <jose-manuel.lorenzo-lopez@ica.conti.de>
Дата:
Hello PG's,

is it possible to create a table with key fields (integer) that will autoincrement  
when inserting a dataset???

Thanks for your help in advance!

Best Regards / Un saludo / Mit freundlichen Grüßen

José Manuel Lorenzo López

**********************************************************************
** José Manuel Lorenzo López                                        **
**                                                                  **
** ICA Informationssysteme Consulting & Anwendungsgesellschaft mbH  **
** Dept. SAP Basis R/3  VBue                                        **
**                                                                  **
** e-mail to: jose-manuel.lorenzo-lopez@ica.conti.de                **
**********************************************************************


Re: create table autoincrement

От:
"Brent R. Matzelle" <bmatzelle@yahoo.com>
Дата:
--- Jose Manuel Lorenzo Lopez
 wrote:
> Hello PG's,
> 
> is it possible to create a table with key fields (integer)
> that will autoincrement  
> when inserting a dataset???
> 
> Thanks for your help in advance!

Try the SERIAL data type.

Brent

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: create table autoincrement

От:
"Richard Huxton" <dev@archonet.com>
Дата:
From: "Jose Manuel Lorenzo Lopez" 

> Hello PG's,
>
> is it possible to create a table with key fields (integer) that will
autoincrement
> when inserting a dataset???
>
Look in the manuals for the CREATE SEQUENCE stuff. There is a special type
SERIAL which does all this for you. Check Bruce's online book too - bound to
have examples in that.

- Richard Huxton

FAQ