From: | Justin Clift <justin(at)postgresql(dot)org> |
---|---|
To: | "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk> |
Cc: | cbell <cbell(at)lighthouseasp(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Range of Serial values |
Date: | 2001-04-16 15:42:01 |
Message-ID: | 3ADB12C9.D07A3D7B@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
I believe you could also create the sequence, then update it with
setval('<sequence name>', <number>);
Regards and best wishes,
Justin Clift
"Poul L. Christiansen" wrote:
>
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
From | Date | Subject | |
---|---|---|---|
Next Message | Poul L. Christiansen | 2001-04-16 16:06:44 | Re: Range of Serial values |
Previous Message | Julian Scarfe | 2001-04-16 15:34:23 | Re: RTREE on points |