rownum ,登录





dos中要sqlplus进入oracle

用户名:system
密码:12345###

SQL>show user;
SQL>connect system as sysdba;
SQL>conn scott;/密码
SQL>alter user scott identified by 新密码;//修改密码
SQL>alter user scott account unlock;//解锁
SQL>exit/quit
SQL>




//查询入职最早的排在第3(不包含)-6位的员工
select empno,ename,hiredate
from(
  select empno,ename,hiredate,rownum rn
  from(  
   select empno,ename,hiredate
   from emp
   order by hiredate
  )
)
where rn>3 and rn<=6;



猜你喜欢

转载自418585708.iteye.com/blog/2154814