电脑疯子技术论坛|电脑极客社区

 找回密码
 注册

QQ登录

只需一步,快速开始

[编程和数据库] mysqlvarchar类型转换int类型

[复制链接]
zhaorong 发表于 2018-9-13 15:45:20 | 显示全部楼层 |阅读模式

select * from tablename order bycast(sid as SIGNED INTEGER)

或者

select * from tablename order bycast(sidas UNSIGNED INTEGER)


您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|VIP|电脑疯子技术论坛 ( Computer madman team )

GMT+8, 2025-2-2 20:39

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表