oracle 11G 学习

sqlplus登陆
在SQLPLUS中输入:用户名/密码@数据库实例 as 权限
例:guoweixin/guoweixin@dzqz as sysdba

创建用户
create user [username] identified by [password]
授DBA权限
grant DBA to [username]
——————————————————————————
一个listener.ora文件
# listener.ora Network Configuration File: C:\app\sunlishan\product\11.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\app\sunlishan\product\11.1.0\db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = sunlishan.jiuqi.com.cn)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )
__________________________________________

如果我想返回排序后的第5条到第10条的记录,该怎么写???
select * from(
select t.rownum rn,t.* from(
select * from table order by ....
) t where rownum<11
) where rn>4;

猜你喜欢

转载自l62s.iteye.com/blog/1465985