adrianogand91 adrianogand91 - 1 year ago 65
SQL Question

Find the value smaller neighbors

I have a table:

enter image description here

What is the query that allows me to take the next smallest value based on what I entered?

Answer Source

Use your input instead of myinput:

select max(value)
from mytable
where value < myinput
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download