5
What command can I use to convert string to integer in mysql? for example:
I am making the following list of tables:
SELECT mov . * , prod.produto, prod.unidade, prod.icms, prod.ipi, prod.codigo
FROM movimentacao AS mov, produtos AS prod
WHERE mov.Codigo = prod.codigo
The field prod.codigo
is with the value 0259
and the countryside mov.Codigo
is with 259
and at the time of comparison they are not equal, I was wondering if you have any command that converts the value of the prod.codigo
for whole to stay 259
Interesting that I could not reproduce the problem here, because comparing string with numeric as you described, the result was True. What version of Mysql and DB engine are being used?
– Bacco