cast(字段 as unsigned)
例如1:把表结构中的name(字符串) 字段转化成整型
cast(name as unsigned)
应用:将表A记录按name 字段从小到大排列
select * from A order by cast(name as unsigned);
http://xuyemao.blog.163.com/blog/static/244548582007226111110800/
cast(字段 as unsigned)
例如1:把表结构中的name(字符串) 字段转化成整型
cast(name as unsigned)
应用:将表A记录按name 字段从小到大排列
select * from A order by cast(name as unsigned);
http://xuyemao.blog.163.com/blog/static/244548582007226111110800/