这样? select bh=identity(int,1,1),* into #temp from 表名 select * from #temp where bh>1
select top(n-1)* from tb ordey by indexcol desc --n 记录数。 --indexcol 您需要排序的列
除了以上的还有: 效率低一点的:SELECT 字段 FROM table1 where 字段 not in (select top 1 字段 from table1)
这是啥意思?select * from tb where id not in (select top 1 id from tb)
真的搞不懂LZ的意思,只是单纯是不要第一条吗? 有什么条件呢,没有的话,有N多写法,下面几句都可以 select * from tb where id <max(id) order by id descselect * from tb where id >min(id) order by id select * from tb where id not in (select min(id) from tb) order by idselect * from tb where id not in (select max(id) from tb) order by id desc
猜一个: select * from t where binary_checksum(*) not in(select top 1 binary_checksum(*) from t)
这样?
select bh=identity(int,1,1),* into #temp from 表名
select * from #temp where bh>1
--n 记录数。
--indexcol 您需要排序的列
效率低一点的:SELECT 字段 FROM table1 where 字段 not in (select top 1 字段 from table1)
select * from t where binary_checksum(*) not in(select top 1 binary_checksum(*) from t)