那你把charindex(rtrim(id),'//序列') as Sort
作为一个字段放在select里面,然后再用Sort字段排序,试试看
select *, charindex(rtrim(id),'//序列') as sort from tbname where id in(//序列) order by sort
sql 按 in 后的顺序排序问题
最新推荐文章于 2024-08-23 11:44:47 发布
那你把charindex(rtrim(id),'//序列') as Sort
作为一个字段放在select里面,然后再用Sort字段排序,试试看
select *, charindex(rtrim(id),'//序列') as sort from tbname where id in(//序列) order by sort