sqlserver中order by 问题?

dandanfst 2009-10-30 10:21:57
我想在order by 后加多个条件,
在Access中order by 可以这样使用
sql="select * from pro order by istop=1,pro_date desc"
在sqlserver中,我该如何使用呢?
...全文
80 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
dandanfst 2009-10-30
  • 打赏
  • 举报
回复
该怎么称呼楼上的前辈呢?可以讲详细点吗?
liangCK 2009-10-30
  • 打赏
  • 举报
回复
order by case hwen istop=1 then 0 else 1 end,pro_date desc
华夏小卒 2009-10-30
  • 打赏
  • 举报
回复

order by col1,col2 desc
fwacky 2009-10-30
  • 打赏
  • 举报
回复

select * from pro where istop=1 order by pro_date desc

34,873

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧