I would like convert a string parameter in a integer inside a where condition.
Case:
SELECT * FROM `pro` WHERE `fld_custom_1` <= '85';
I would like convert the '85'(STRING) in 85(INTEGER).
It's possible?
SELECT * FROM pro WHERE fld_custom_1 <= cast(@param as unsigned)
When fld_custom_1 is of a number data type then MySQL will automatically convert the string parameter to a number to make the comparision.
cast('85' as unsigned)
'85absdaojfiwefmwef'to85.