时间:2021-07-01 10:21:17 帮助过:28人阅读
例子:
--使用CAST将varchar转换成int类型排序 select server_id from cardserver where game_id = 1 order by CAST(server_id as SIGNED) desc limit 10; --使用CONVERT将varchar转换成int类型排序 select server_id from cardserver where game_id = 1 order by CONVERT(server_id,SIGNED) desc limit 10
MySQL类型转换 使用CAST将varchar转换成int类型排序
标签:使用 class select arc esc varchar datetime signed 类型