易截截图软件、单文件、免安装、纯绿色、仅160KB

ORACLE 10 学习笔记命令 第一课。(付首昕)

ORACLE 10 学习笔记命令第一课。
1.
sqlplus /nolog
connect /as sysdba
alter user scott account unlock;
alter user scott identified by manager;
2.
grant  select on dept to nmerp;
revoke select on dept to nmerp;
select * from scott.dept
create table abc(a varchar2(10),b char(10));
alter  table abc add c number;
3.
select length('abcdef') from dual;
select trim( 'abc' )    from dual;
select substr('abcdefg',2,3) from dual;
4.
sysdate/current_date/next_day
max/min/sum/count/avg
user/decode
5.
select a.dname,b.ename,b.sal,b.comm,b.job
from dept a right join emp b
on a.deptno=b.deptno and a.deptno=10;
6.
select ename,to_char(hiredate,'YYYY-MM-DD') from emp;
7.
select max(sal),min(sal) from emp;
select avg(sal),sum(sal) from emp;
select variance(sal),stddev(sal) from emp; (方差和标准差)
select deptno,avg(sal),max(sal) from emp group by deptno;
select deptno,job,avg(sal),max(sal) from emp group by deptno,job;
select deptno,avg(sal),max(sal) from emp group by deptno having avg(sal)<2000;
8.
select dept.dname, emp.ename from dept,emp where dept.dname='sales';
select dept.dname, emp.ename from dept,emp where dept.deptno=emp.deptno;
select d.dname, e.ename from dept d , emp e where d.deptno=e.deptno;
select e.ename, e.sal, d.dname from emp e, dept d  where e.deptno=d.deptno;
9.
select a.ename, a.sal, b.grade from emp a, salgrade b
where a.sal between b.losal and b.hisal;
10.
select manager.ename from emp manager, emp worker where manager.empno=worker.mgr
and worker.ename='BLAKE';


相关文档:

Oracle与AIX的角色

1.2.1  Oracle与AIX的角色
Oracle运行在AIX上,提供着数据的存储和管理服务。数据即信息,Oracle数据库就是应用系统中存储数据信息的一个集中存储位置、一种存取方法的商品化实现。AIX是承载Oracle运行的底层平台,进行着CPU调度、内存调度、存储管理、文件管理、网络驱动等系统运行和维护工作。
作为对应用系统的支 ......

Oracle中几个关于日期方面的SQL实例

№1:取得当前日期是本月的第几周
SQL> select to_char(sysdate,'YYYYMMDD W HH24:MI:SS') from
dual;

TO_CHAR(SYSDATE,'YY
-------------------
20030327 4 18:16:09

SQL> select to_char(sysdate,'W') from dual;

T
-
4 ......

ora_01034:oracle not available报错 解决方法

因为强制关机,开机的时候进入数据库报错:
ora_01034:oracle not available
ora_27101:shared memory realm does not exit
解决方法:
1.打开CMD
2.输入 sqlplus "/as sysdba"
3.回车
4.输入 startup
5.结束 ......

北大青鸟oracle学习笔记11

簇:
有公共列的两个或多个表的集合
簇表中的数据存储在公共数据块中
簇键:
唯一标识符
创建簇:
减少I/O操作,减少磁盘空间,但是插入性能降低。
两张表中有共同的列,比如学生表中有班级编号,班级表中也有班级编号,可以将班级编号存放在簇中
create cluster 簇名(
字段名 类型
)tablespace 表命名空间;
cr ......

Oracle RAC 常用维护工具和命令


Oracle 的管理可以通过OEM或者命令行接口。 Oracle Clusterware的命令集可以分为以下4种:
节点层:osnodes
网络层:oifcfg
集群层:crsctl, ocrcheck,ocrdump,ocrconfig
应用层:srvctl,onsctl,crs_stat
下面分别来介绍这些命令。 
一. 节点层
只有一个命令: osnodes, 这 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号