I have a table that has a primary key nr.
"select max(nr) from pathobefund;" returns:
max
---
7
(1 row)
Now, I would like to have a sequence for nr. How do I create one that starts
exactly at max(nr) als last value?
"create sequence eo_pk_for_pathobefund start select max(nr) from
pathobefund;" does not work.
Please help me.
Dave
> vac=> \h create sequence
> Command: create sequence
> Description: create a new sequence number generator
> Syntax:
> create sequence <sequence_name>
> [increment <NUMBER>]
> [start <NUMBER>]
> [minvalue <NUMBER>]
> [maxvalue <NUMBER>]
> [cache <NUMBER>]
> [cycle];
>
> Vadim
I know that but I want max(nr) from table pathobefund als start value. And I
want to generate a slq file that can I send to psql without selecting
max(nr) first, writing it down and insert it...
---
_ _
_(_)(_)_ David Wetzel, Turbocat's Development,
(_) __ (_) Buchhorster Strasse, D-16567 Muehlenbeck/Berlin, FRG,
_/ \_ Fax +49 33056 82835 NeXTmail da...@turbocat.de
(______) http://www.turbocat.de/