--分页查询 select rownum e,emp.* from emp where rownum<=5; --查找一段3-5行 select * from (select rownum e,emp.* from emp where rownum<=5) where e>3 ;--为什么使用别名 -- 更新可以锁定资源 update emp set ename='haha' where sal=3000; --插入也可以锁定资源 insert into emp(empno)values(9); commit; delete from emp where empno =3 select * from emp lock table emp in share mode ;--锁表 lock table emp in exclusive mode;--解锁 select * from emp for update --查询锁