List:General Discussion« Previous MessageNext Message »
From:Paul Halliday Date:December 3 2010 4:56pm
Subject:Re: Lowest non-zero number
View as plain text  
On Fri, Dec 3, 2010 at 12:50 PM, Mark Goodge <mark@stripped> wrote:
> Given a table containing a range of INT values, is there any easy way to
> select from it the lowest non-zero number?
>

SELECT number FROM table WHERE number > 0 ORDER BY number ASC LIMIT 1;

?
-- 
Paul Halliday
Ideation | Individualization | Learner | Achiever | Analytical
http://www.pintumbler.org
Thread
Lowest non-zero numberMark Goodge3 Dec
  • Re: Lowest non-zero numberPaul Halliday3 Dec
    • Re: Lowest non-zero numberMark Goodge3 Dec
      • Re: Lowest non-zero numberMySQL)3 Dec
  • Re: Lowest non-zero numberMySQL)3 Dec