按照通常的方法是實現不了的,我們得藉助於臨時表以及一個函數來實現
代碼如下:
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--用完後刪除臨時表
按照通常的方法是實現不了的,我們得藉助於臨時表以及一個函數來實現
代碼如下:
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--用完後刪除臨時表