searchNum:为当前查询的编号
1.查询上一条数据
select * from tbl_stu where num = (select max(num) from tbl_stu where num < searchNum)
2.查询下一条数据
select * from tbl_stu where num = (select min(num) from tbl_stu where num > searchNum)
3.查询上一条和下一条数据
select * from tbl_stu
where num in(
(select max(num) from tbl_stu where num < searchNum),
(select min(num) from tbl_stu where num > searchNum)
)