1.手动转化类型(直接+0)

select server_id from cardserver where game_id = 1 order by server_id+0 desclimit 10

2.使用MySQL函数CAST

select server_id from cardserver where game_id = 1 order by CAST(server_id as SIGNED) desc limit 10;

3.使用MySQL函数CONVERT

select server_id from cardserver where game_id = 1 order by CONVERT(server_id,SIGNED)desc limit 10;

 

Logo

更多推荐