mysql分页用limit
select * from user where address = '唐山' limit 10, 20
oracle分页用rownum
查询user表中前5条数据,注意不能使用等于号,不然查不出数据 简单分页
select * from user where rownum <= 5
当分页为取值范围时上面的就不行
select name, sex, age, phone, address
from (
select name, sex, age, phone, address, rownum num
from user
) b
where
//开始页
b.num >= 20
//结束页
and b.num <= 30