From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Peter Atkins <Peter(dot)Atkins(at)nextcard(dot)com> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Changeing Sequence |
Date: | 2002-03-26 20:11:56 |
Message-ID: | 20020326121027.U13230-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, 26 Mar 2002, Peter Atkins wrote:
> I have a table "mytable_id_seq" that looks like so.
>
> sequence_name | last_value | increment_by | max_value |
> min_value | cache_value | log_cnt | is_cycled | is_called
> ----------------------+------------+--------------+---------------------+---
> --------+-------------+---------+-----------+-----------
> mytqble_id_seq | 4 | 1 | 9223372036854775807 |
> 1 | 1 | 30 | f | t
>
>
> I have data that must be entered into the table "mytable" with pre-defined
> ids (i.e. 1,3,5,7,25). Is it possible to change the sequence to start at
> "26" the last value of the previous data?
select setval('mytqble_id_seq', 25);
should make the next result 26 I believe.
From | Date | Subject | |
---|---|---|---|
Next Message | PG Explorer | 2002-03-26 20:16:45 | Re: Changeing Sequence |
Previous Message | Dan Langille | 2002-03-26 20:11:33 | Re: Changeing Sequence |