Re: Range of Serial values - Mailing list pgsql-sql

From Poul L. Christiansen
Subject Re: Range of Serial values
Date
Msg-id 3ADB1894.21BF68A2@cs.auc.dk
Whole thread Raw
In response to Range of Serial values  (cbell <cbell@lighthouseasp.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: cbell
Date:
Subject: Range of Serial values
Next
From: "Albert REINER"
Date:
Subject: RULE ... TO table.column