[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] customising serial type
From:       Stefan Becker <stefan () yukonho ! de>
Date:       2005-06-21 16:34:39
Message-ID: 200506211834.39833.stefan () yukonho ! de
[Download RAW message or body]

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



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic