Row ID and auto-increment?
Raymond Chui <raymond.chui@noaa.gov>
From: Raymond Chui <raymond.chui@noaa.gov>
To: pgsql-general@postgresql.org
Date: 2001-02-14T21:08:12Z
Lists: pgsql-general
Attachments
- raymond.chui.vcf (text/x-vcard)
If I create a table like create table tablename ( aNum integer not null, name varchar(10) ); If I do select * from tablename; q1. Is there such thing rowid similar to Oracle in PostgreSQL? q2. How do I make aNum auto increment by 1? Need to write a trigger? how to write that? I want to enforce column aNum 0,1,2,.....n. I want to prevent data entry people input 0,1,4,5,8,...n. Thank you very much in advance! --Raymond