按照通常的方法是实现不了的,我们得借助于临时表以及一个函数来实现
代码如下:
Select no=Identity(int,1,1),* Into #temptable From dbo.teacher_info order by teacher_name--利用Identity函数生成记录序号
Select * From #temptable Where no>=10 And no < 20
Drop Table #temptable--用完后删除临时表
这样我们就实现了我们的目的。
查看更多关于SQLServer中选出指定范围行的SQL语句代码的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did34092