to get numeric values from an ENUM column, can be using
mysql> SELECT enum_col+0 FROM tbl_name;
But in my mysql5.5 console,this query return:
1.0000000000000000000000000000000
I want to get the a integer number 1
I know I can use:
SELECT CONVERT(enum_col,UNSIGNED) FROM tbl_name;
or
SELECT CAST(enum_col AS UNSIGNED) FROM tbl_name;
I want to know why enum_col+0 return a float,
and any other way to get numeric values from an ENUM column?