Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: serial column



On Sun, 2006-09-24 at 13:50 -0700, Bob Pawley wrote:
> I need to develop a serial column that always starts at 1 and is
> sequential even after deletes.
>  
> Any ideas???
>  

Did you try the:

create table tbl
(
	id SERIAL
);

or even with primary key...

create table tbl
(
	id SERIAL primary key
);


-- 
Regards,
Gevik Babakhani






Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group