sql语句怎样从数据库中查找某一条到某一条之间的记录

如题所述

第1个回答  2017-03-16
where 某条数据的字段名 between '值1' and '值2'
第2个回答  2017-03-16
不知道我有没有理解你的意思
sqlserver数据库
select *from(
select Row_number()over(order by id) as rn,*from emp) as e
where e.rn between 15 and 20
oracle数据库
select*from (
select rownum as rn,a.*
from(select *from emp order by id)as a) as b
where b .rn between 15 and 20
相似回答