Re: next integer in serial key

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: next integer in serial key
Date: 2004-07-22 05:31:18
Message-ID: 1090474278.25749.173.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 2004-07-22 at 03:45, Kenneth Gonsalves wrote:
> hi,
> how does one get the next number in a serial type row?

When inserting a new row, do not mention the serial column in the list
of columns, or else give it the value DEFAULT.

--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"Then Peter and the other apostles answered and said,
We ought to obey God rather than men."
Acts 5:29

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Cox 2004-07-22 07:38:28 LIKE on index not working
Previous Message terry 2004-07-22 04:55:40 Re: next integer in serial key