关于行号问题如何用select查询解决?
时间:2003-12-06 20:33 来源:ACCESS911 作者:ec 阅读:次
SELECT (
SELECT count(*) as dd
FROM [121_PinYinIndex ] as a where a.[id]<b.[id]) AS bb, b.[id]
FROM [121_PinYinIndex ] AS b;
经常碰到的按成绩排名的问题也可以用同样的方法解决:
SELECT (
SELECT count(*)+1 as dd
FROM [成绩表] as a where a.[实际成绩]>b.[实际成绩]) AS bb, b.[实际成绩]
FROM [成绩表] AS b order by b.[实际成绩] desc
(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
相关内容
最新内容