On 12/3/2010 11:50, Mark Goodge wrote:
> Given a table containing a range of INT values, is there any easy way to
> select from it the lowest non-zero number?
>
> Obviously, MAX(column) will return the highest, but MIN(column) will
> return 0 if any row contains a 0, which isn't what I want.
>
> Any clues?
>
> Mark
SELECT MIN(column) FROM table WHERE column>0 ?
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc.
Office: Blountville, TN

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.