mysql CAST enum datatype to decimal

I noticed that we can’t convert ENUM datatype to decimal directly. What I do is CAST enum data to Char first and then convert to Decimal as below

SELECT CAST(CAST(myenum AS CHAR) AS DECIMAL(10,2))

Please share if you have better solution

About ibnuyahya

Ibnuyahya has written 104 post in this blog.

Ibnuyahya merupakan seorang software developer dan freelance consultant. Berpengalaman lebih dari 10 tahun dalam membangunkan perisian dari embedded sistem menggunakan micro-controller, windows application, mobile, image processing, artificial intelligent dan akhirnya menumpukan sepenuh tenaga dalam web application.