use SMSstudent
go
/*第一种分页方法 */
SELECT TOP (5) studentID, studentName, nation, sex, birthday, classID, telephone, credithour, ru_date, address, pwd, remark
FROM student
WHERE (studentID NOT IN
(SELECT distinct TOP (5) studentID
FROM student AS student_1
ORDER BY studentID DESC))
ORDER BY studentID desc
/*第二种分页方法*/
select studentID, studentName, nation, sex, birthday, classID, telephone, credithour, ru_date, address, pwd, remark from (
select (row_number() over(order by studentID desc) ) as IDa,* from student ) as ids where ids.ida>5 and ids.ida<=10