I recently encounter a problem in sql ,
I have a table called Plan which looks like as below order by Distance ...
Distance Destination
0 a
1 null
2 null
3 b
. null
. null
1050 c
I have two value as input from the user like a and b or b and c , how can I just get this range of value by using SQL
what I did is select the distance of a and b , and re-select all the list by doing distance > a.distance and distance < b.distance . any idea of how to write this more efficient and more clever in one sql ? sorry for this noob question ; my desire result is like when you input :b and c
return a list
0 b
. null
. null
1047 c