| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Shawn Green (MySQL) | Date: | December 3 2010 5:04pm |
| Subject: | Re: Lowest non-zero number | ||
| View as plain text | |||
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
| Thread | ||
|---|---|---|
| • Lowest non-zero number | Mark Goodge | 3 Dec |
| • Re: Lowest non-zero number | Paul Halliday | 3 Dec |
| • Re: Lowest non-zero number | Mark Goodge | 3 Dec |
| • Re: Lowest non-zero number | MySQL) | 3 Dec |
| • Re: Lowest non-zero number | MySQL) | 3 Dec |
