2
I have a column (value) in MYSQL in varchar, and in it I store whole or broken numbers, like this:
1.1
2
3.99
4.2
2.345
In the query I need to know when a number is (greater or equal) and (less or equal) to these numbers stored in the bank, I did so:
WHERE valor >= :valor1 AND valor <= :valor2
But it doesn’t work, I believe it occurs because it’s a varchar field, right? How to transform?
But inside the WHERE that would look like?
– caiocafardo
I adjusted the answer :)))))))
– Filipe L. Constante
You can use between instead of operators >= <= :) Facilitates writing.. :)
– Filipe L. Constante
Give feedback if your question has been resolved and mark the answer as correct if positive. : ) This will help other users to resolve the question if it is similar to yours.
– Filipe L. Constante