27,583
社区成员
发帖
与我相关
我的任务
分享order by
case when col like '%a' then 1
when col like 'b%' then 2
when col like 'c%' then 3 endselect top 100 * from tb
declare @rownum int
if @@rowcount<100
select column1 from tb
union
select column2 from tb where @rownum=(100-@@rowcount)select top 100 * from t2
if @@ROWCOUNT <100
。。。。。