infomf infomf - 26 days ago 11
MySQL Question

MySql type char select max number

how select max or min number from colums of type char?

Function max return max lenght.

Thanks

Answer

Just add zero in your coloum

select max(column+0),min(column+0)  

By adding zero to a column mysql cast coloum to integer

Comments