What would be the best way to return an integer value as a string in MySQL? For example:
>select id from table;
>1
but return it as string rather than integer? There are references to cast as causing major headaches with different values even for integer to string conversion.
CAST(id)is unsafe. You can also useCONCAT(id), but there's really no difference.