Sqlserver2008和Oracle分页语句
SqlServer 分页语句
select StuID ,StuNo,StuName,Age,Sex, ClassName ClassName from
(select *, row_number() over (order by StuID asc) as number from StudentInfo) t ,
ClassInfo c where t.ClassID = c.ClassID and t.number between @startindex and @endindex
表1==ClassInfo
表2==StudentInfo
变量:@startindex 和 @endindex
Oracle 分页语句
select * from (select id, name,
producttype, price, picture, isout, mark,
adddate,rownum rn from products) temp
where temp.rn>=:startIndex and temp.rn<=:endIndex
表==Products