pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefan Becker <stefan@yukonho.de>
To: PostgreSQL SQL <pgsql-sql@postgresql.org>
Subject: Re: customising serial type
Date: Tue, 21 Jun 2005 18:34:39 +0200
Message-ID: <200506211834.39833.stefan@yukonho.de> (raw)
In-Reply-To: <200506211531.28871.lawgon@thenilgiris.com>
References: <200506211531.28871.lawgon@thenilgiris.com>

Am Dienstag, 21. Juni 2005 12:01 schrieben Sie:
> hi,in a table with a serial datatype, how do i get the sequence to start at
> a specific number like 100000?


Use START in the create sequence statement.
#

create sequence seq_xeingang increment 1 start 1000;
;

CREATE TABLE xeingang  
( 
  id            integer default nextval('seq_xeingang'),
  buch        char not null, 
  eingdt      date not null,
  jnr           integer not null,
  grp           integer,
  code          integer not null
);



my best regards..

Stefan





view thread (4+ messages)

Message-ID: <200506211834.39833.stefan@yukonho.de>
Permalink:  ../200506211834.39833.stefan@yukonho.de/
Also on:    postgresql.org/message-id/200506211834.39833.stefan@yukonho.de

 · 

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: stefan@yukonho.de
  Subject: Re: customising serial type
  In-Reply-To: <200506211834.39833.stefan@yukonho.de>

* 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