On Tue, Aug 31, 2010 at 9:07 AM, Eric Smith wrote:
>
> You probably don't want 'SELECT max(foo_id)+1' because I think that does
> a full table scan.
>
>
you're right, but slightly modified version SELECT (SELECT max(foo_id) FROM
MxVft_FTIndex)+1 does not
Max
On Aug 30, 2010, at 10:07 PM, Eric Smith wrote:
> Scott Frankel wrote:
>
>> Hi all,
>>
>> How does one find the next value of a serial item? Given a simple
>> table with a serial primary key, I'd like to get the next available
>> integer key value. eg:
>>
>> CREATE TABLE foo (
>> foo_id
Scott Frankel wrote:
> Hi all,
>
> How does one find the next value of a serial item? Given a simple
> table with a serial primary key, I'd like to get the next available
> integer key value. eg:
>
> CREATE TABLE foo (
> foo_id SERIAL PRIMARY KEY,
> name
Hi all,
How does one find the next value of a serial item? Given a simple
table with a serial primary key, I'd like to get the next available
integer key value. eg:
CREATE TABLE foo (
foo_id SERIAL PRIMARY KEY,
nametext
4 matches
Mail list logo