I need to write a query that selects a minimum value and it's second most minimum value from a list of integers.
Grabbing the smallest value is obvious:
select min(value) from table;
But the second smallest is not so obvious.
For the record, this list of integers is not sequential -- the min can be 1000, and the second most min can be 10000.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…