如何让SQLServer的id按照数字大小顺序排序
发布时间:2020-12-12 12:55:16 所属栏目:MsSql教程 来源:网络整理
导读:我的id从1到20,可是超过了SQLServer的默认排序这样的 1 10 11 12 . . . 19 2 3 4 5 6 7 请问如何才能让排序成为这样 1 2 3 4 5 6 7 8 9 10 11 . . . 排序规则选哪条? ? ? select * from tb order by cast(id as int)
我的id从1到20,可是超过了SQLServer的默认排序这样的 ? ? select * from tb order by cast(id as int) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |