Re: auto_increment

From: "Muhyiddin A(dot)M Hayat" <middink(at)indo(dot)net(dot)id>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: auto_increment
Date: 2003-09-20 08:43:10
Message-ID: 002201c37f54$29608e40$1f00a8c0@middinkcomp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ok, but if i do rollback, the auto_increment don't roolback.
How to use nextval(), currval() and setval() functions.

----- Original Message -----
From: Cavit Keskin
To: 'Muhyiddin A.M Hayat'
Sent: Saturday, September 20, 2003 2:15 PM
Subject: RE: [SQL] auto_increment

Create table tablename(

id serial,

....

);

Serial type is integer and autoincrement

When you create this table creates automatic sequence tablename_id_seq

Stored sequence last value;

Try execSQL : select * from tablename_id_seq;

My english is very very little and bad


Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2003-09-20 10:05:30 Re: auto_increment
Previous Message btober 2003-09-20 07:45:23 Re: auto_increment