level 1
select * from table as t1 where id in(select top 10 id from table as t2 where t1.kind = t2.kind) order by kind
id是table表的主键,kind是类别,这条命令返回的是每个类别的前10条记录,不明白为什么子查询中用kind做关联会返回每个类别top n的记录
2011年04月16日 15点04分
1
level 1
select top 10 id from table as t2 这个是返回多少条记录啊?
上面这语句返回的记录 id 看看是什么情况
2011年06月24日 04点06分
2