select top 10 column1,column2,column3 from table1 where table1.id not in(select top 0 table1.id from table1 order by column1 asc) order by column1 asc

注意这种写法会报错  列名 'column1' 不明确

在查下时不把列名写出来,用* 就不会报错,目前还不知道原因,有知道的请指点

select top 10 * from table1 where table1.id not in(select top 0 table1.id from table1 order by column1 asc) order by column1 asc

这样就不会报错了

 

posted on 2017-05-24 12:58  御不凡  阅读(2945)  评论(0编辑  收藏  举报