请教条件select查询

passionke 2003-10-03 03:41:39
假设表table_c 有count ,name ,age三个字段,要查询name,age,要求count字段值大于20的数据中以降序排列的前20个值,select语句该怎么写?
...全文
44 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wenjhua 2003-10-03
  • 打赏
  • 举报
回复
Select top 20 name,age from table_c

Where count > 20

Order by count desc

来迟了一步,晕!~~~~~
quanyi 2003-10-03
  • 打赏
  • 举报
回复
Select top 20 name,age from table_c
where count > 20
order by count desc
  • 打赏
  • 举报
回复
select name,age from table_c where count>20 order by count desc
welyngj 2003-10-03
  • 打赏
  • 举报
回复
select top 2 name,age from table_c
where count>20
order by count desc
txlicenhe 2003-10-03
  • 打赏
  • 举报
回复
Select top 20 name,age from table_c
where count > 20
order by count desc

34,874

社区成员

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

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