Convert string to double (NOT decimal)

Ferdinand.kraft

I have a table of double precision values, and I need to insert new values calculated from strings with numeric meaning.

MySQL doesn't seem to allow such conversion:

select cast('3.33' as double);

(error)

select cast('3.33' as decimal(3,2));

(works, but it's not what I need).

Ferdinand.kraft

Workaround:

select '3.33' + 0.0;

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related