On 12/3/2010 12:16, Mark Goodge wrote:
On 03/12/2010 16:56, Paul Halliday wrote:
On Fri, Dec 3, 2010 at 12:50 PM, 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?
SELECT number FROM table WHERE number>
On 03/12/2010 16:56, Paul Halliday wrote:
On Fri, Dec 3, 2010 at 12:50 PM, 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?
SELECT number FROM table WHERE number> 0 ORDER BY number ASC LIMIT 1;
Sorry
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
On Fri, Dec 3, 2010 at 12:50 PM, 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?
>
SELECT number FROM table WHERE number > 0 ORDER BY number ASC LIMIT 1;
?
--
Paul Halliday
Ideation | Indiv
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
--
http://mark.goodge.