pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Muhyiddin A.M Hayat <middink@indo.net.id>
To: pgsql-sql@postgresql.org
Subject: Re: auto_increment
Date: Sat, 20 Sep 2003 16:43:10 +0800
Message-ID: <002201c37f54$29608e40$1f00a8c0@middinkcomp> (raw)
References: <001d01c37f3e$983ed3a0$2363a8c0@ckeskin>

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

   

view thread (27+ messages)  latest in thread

Message-ID: <002201c37f54$29608e40$1f00a8c0@middinkcomp>
Permalink:  ../002201c37f54$29608e40$1f00a8c0@middinkcomp/
Also on:    postgresql.org/message-id/002201c37f54$29608e40$1f00a8c0@middinkcomp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: middink@indo.net.id
  Subject: Re: auto_increment
  In-Reply-To: <002201c37f54$29608e40$1f00a8c0@middinkcomp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox