RE: help with serial type

From: <jeff(dot)fitzmyers(at)managestar(dot)com>
To: <gee308(at)mediaone(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: RE: help with serial type
Date: 2001-04-26 23:18:23
Message-ID: 371EAC487A83CD4296F6999FD088D8331B700C@atlas.managestar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try this command at the psql command line:

CREATE SEQUENCE atable_id_seq;
ALTER TABLE atable ALTER COLUMN id SET DEFAULT
nextval('"atable_id_seq"'::text);

Jeff

-----Original Message-----
How can I make the insert
command automatically update the 'id' to the next highest number?

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2001-04-26 23:19:34 Re: JDBC speed question.
Previous Message Clayton Vernon 2001-04-26 23:16:02 Re: JDBC speed question.