Re: SELECT Question - Mailing list pgsql-general

From Lada 'Ray' Lostak
Subject Re: SELECT Question
Date
Msg-id 00a401c3af38$8564a1e0$0d01a8c0@utopia
Whole thread Raw
In response to SELECT Question  (Alex <alex@meerkatsoft.com>)
Responses Re: SELECT Question
Re: SELECT Question
List pgsql-general
> Is there an easy way to write a select statement that returns me the
> frist free number or any within the range of 200?
> For example if 1-30, and 32-50 are occupied then i would like to fill in
> the new entry with id 31.
> I currently do it with a function but I was just wondering if there is a
> way without it..
If I understand well, what something about

    SELECT min(xxx) FROM table WHERE xxx<50

Best regards,
Lada 'Ray' Lostak
Unreal64 Develop group
http://www.orcave.com
http://www.unreal64.net


--------------------------------------------------------------------------
In the 1960s you needed the power of two C64s to get a rocket
to the moon. Now you need a machine which is a vast number
of times more powerful just to run the most popular GUI.



pgsql-general by date:

Previous
From: Alex
Date:
Subject: SELECT Question
Next
From: Alex
Date:
Subject: Re: SELECT Question