关于查询语句的排序 select 姓名,case when charindex('您好',备注)>0 then '*' else '' end as 备注 order by 备注我想让所有带*排在一起,order by 语句怎么写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select 姓名FROM table1ORDER BY case when charindex('您好',备注)>0 then '*' else '' end,备注 select 姓名,case when charindex('您好',备注)>0 then '*' else '' end as 备注 order by 2 select 姓名FROM table1ORDER BY case when charindex('您好',备注)>0 then 1 else 2 end,备注 select 姓名,case when charindex('您好',备注)>0 then '*' else '' end as 备注 order by 2 order by 2 //按筛选的第二列排序参考:http://topic.csdn.net/t/20061212/17/5225505.html学习!! select 姓名,case when charindex('您好',备注)>0 then '*' else '' end as 备注 order by case when charindex('您好',备注)>0 then 0 else 1 end vfp9.0:sele 姓名, 备注 from tt where 备注 like %"您好"% into table myttupdate mytt set 备注='*'由于不清楚charindex()?可能不符合楼主的意思。 select 姓名, 备注 from tt where 备注 like %'您好'% into table myttupdate mytt set 备注='*' 请帮我看下我的SQL语句错在哪? odbc查询的速度很慢,求原因 关于备份的问题请教 这个SQL还能优化么,没分了,5 求一条高效重复查询sql语句 谢谢大家了 100分先上 一个小存储过程的问题,大家帮帮忙 函数与直接SQL语句有什么区别? 请教各位老大,日志文件里的记录怎么样才可以恢复 请问SQL Server中将一个字段设置为自动增量型以后,能否在程序中加下一条记录时使用函数nextval()取得的值作为该字段的值插入? 【100分秒结】cte 里面 的一个错误帮修正 求几本电子书 谢 执行速度缓慢,能否优化一下IF语句?
FROM
table1
ORDER BY
case when charindex('您好',备注)>0 then '*' else '' end,备注
FROM
table1
ORDER BY
case when charindex('您好',备注)>0 then 1 else 2 end,备注
order by 2 //按筛选的第二列排序参考:http://topic.csdn.net/t/20061212/17/5225505.html
学习!!
select 姓名,case when charindex('您好',备注)>0 then '*' else '' end as 备注 order by
case when charindex('您好',备注)>0 then 0 else 1 end
sele 姓名, 备注 from tt where 备注 like %"您好"% into table mytt
update mytt set 备注='*'由于不清楚charindex()?可能不符合楼主的意思。
select 姓名, 备注 from tt where 备注 like %'您好'% into table mytt
update mytt set 备注='*'