Re: Sequence on a char(6) column - Mailing list pgsql-novice

From Jaime Casanova
Subject Re: Sequence on a char(6) column
Date
Msg-id c2d9e70e0512140626g769f7d90weaefa48014c87d95@mail.gmail.com
Whole thread Raw
In response to Sequence on a char(6) column  ("Roland Giesler" <roland@giesler.za.net>)
List pgsql-novice
On 12/14/05, Roland Giesler <roland@giesler.za.net> wrote:
> Is it possible to create a sequence like 'ABC012','ABC013', etc. in a
> char(6) column?
>

i guess you can do something like:


create sequence seq1;

create table tt (
...
fld1 char(6) default 'str' || nextval('seq1'),
...
);

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

pgsql-novice by date:

Previous
From: "Roland Giesler"
Date:
Subject: Sequence on a char(6) column
Next
From: "Charlie Bright"
Date:
Subject: Help please