select top * 100 from (select top 200 * from Table1 order by ID) T order by id DESC
select top 100 * from (select top 200 * from Table1 order by ID) T order by id DESC
这个问题还有在:http://community.csdn.net/Expert/topic/4615/4615115.xml?temp=.2055323 的讨论如下: 因为我现在得出的记录是从三张表中联合查询出来的,当再次使用 select 嵌套的话总会有以下信息出现:多次为 ‘table’指定了列 ‘列名’。我的具体代码如下:select * from ( select top 100 * from a,b,c where (a.id=b.id and b.id=c.id and b.col1='100' and c.col2='10') order by convert(int,a.id)desc )a order by a.id
因为我现在得出的记录是从三张表中联合查询出来的,当再次使用 select 嵌套的话总会有以下信息出现:多次为 ‘table’指定了列 ‘列名’。我的具体代码如下:select * from
(
select top 100 * from a,b,c
where (a.id=b.id and b.id=c.id and b.col1='100' and c.col2='10')
order by convert(int,a.id)desc
)a order by a.id