Answer the question
In order to leave comments, you need to log in
How to select from a span if one end can be 0?
For example, I send a circulation value of 1000 to the request.
The table looks like this
Start End Price
10 100 500
101 500 1000
501 600 1500
601 0 2000
How do I choose the price in this case, BETWEEN is not suitable, because there should be two ends.
Only >= and <=.
SELECT price FROM prices WHERE tirag >= start AND tirag <= end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question