查询不同类型的前10条记录?在线等! select * from t awhere id in(selec top 10 from t where type=a.type) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select id,type,name from table a where a.id in (select top 10 min(id) from table group by type) select t.* from tablename as t where t.id in(selec top 10 from t where type=t.type) order by t.type select top 10 a.type from tt awhere exists (select * from tt where TYPE=a.TYPE) group by a.type select t.* from tablename as t where t.id in(selec top 10 id from t where type=t.type) order by t.type select top 10 * from test awhere id in(select top 1 id from test where a.type=type) libin_ftsafe(子陌红尘) 完全正确 数据库架构的问题 求一条SQL语句。 小弟处女帖~~求一简单tsql存储过程 简单又极具挑战的sql请教,如何合并两列字符串数据? distinct 与order by 联用引发的问题 在sql怎样复制一个表结构和其所有值 ADO能不能使用sqlserver2005的Notification Services? 请问:一个SELECT语句里是不是只能有一个CASE? 没辙了!Access高手请进!关于权限问题 如何写获取一定记录数(如1000天)的SQL语句 急!能不能写这样的SQL语句? 主、外键的基础问题请帮忙看看!(小弟初学者,谢谢)
from table a
where a.id in (select top 10 min(id) from table group by type)
from tt a
where exists (select * from tt where TYPE=a.TYPE) group by a.type
where id in(select top 1 id from test where a.type=type)
完全正确