pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Poul L. Christiansen <poulc@cs.auc.dk>
To: cbell <cbell@lighthouseasp.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Range of Serial values
Date: Mon, 16 Apr 2001 18:06:44 +0200
Message-ID: <3ADB1894.21BF68A2@cs.auc.dk> (raw)
References: <3ADB0FEF.12951EE1@lighthouseasp.com>

Yes, there is.

When you create a serial column a sequence is created, which does the
counting.

You can create a serial column, drop the associated sequence and create
a new one with the command:
"CREATE SEQUENCE seqname START 1000".

See also "\h CREATE SEQUENCE".

HTH,
Poul L. Christansen

cbell wrote:
> 
> Hello everyone,
> 
> when creating a serial column, is there a way to specify which number it
> will start counting from?  For example, if you wanted all Serial ID's to
> start at 1000 and count up from there, with no numbers below that.
> 
> Thanks,
> Chris.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html



view thread (4+ messages)  latest in thread

Message-ID: <3ADB1894.21BF68A2@cs.auc.dk>
Permalink:  ../3ADB1894.21BF68A2@cs.auc.dk/
Also on:    postgresql.org/message-id/3ADB1894.21BF68A2@cs.auc.dk

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: poulc@cs.auc.dk, cbell@lighthouseasp.com
  Subject: Re: Range of Serial values
  In-Reply-To: <3ADB1894.21BF68A2@cs.auc.dk>
  References: <3ADB0FEF.12951EE1@lighthouseasp.com> <3ADB1894.21BF68A2@cs.auc.dk>

* 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