1. 程式人生 > >mysql varchar型別轉換int型別或者浮點數

mysql varchar型別轉換int型別或者浮點數

select * from gyzd_yysinfo order by cast(yysid as SIGNED INTEGER)

或者

select * from gyzd_yysinfo order by cast(yysid as UNSIGNED INTEGER)

浮點數
select cast(“23333.3333” as decimal(9,2));

https://www.cnblogs.com/crystaltu/p/7929975.html
https://blog.csdn.net/hwsdau/article/details/68944655