易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

Oracle索引、视图、sqlplus基础、分区表

索引
 索引的目的是提高存储数据页面的速度
 服务器扫描索引以获得数据存储单元的地址
 索引的优点为:提高查询的执行速度、实施数据的唯一性、加速了表之间的连接
 索引的缺点为:创建索引需要花费较多的时间、每个创建的索引连同原先的数据源都需要空间来存储数据、每次修改数据时索引都要更新
 --
 按照索引数据的存储方式可以分为:
 B*树索引
 位图索引
 按照索引个数分为:
 单列索引
 复合索引
 索引列值唯一性可分为:
 唯一索引
 非唯一索引(默认)
 --
 Create [unique] index index_name
 On table_name(column_name,column_name…)
 [tablespace tablespace_name];
 select * from emp  where ename=‘SCOTT’
 那么我们可以在ename列上创建B树索引,语句如下:
 create  index  ind_ename  on  emp(ename) tablespace  users
 --
 位图所以
 以位置来表示索引数据
 相比B树索引,位图索引可以节省大量磁盘空间
 基于每个不同值建立一个位图
&n ......

Oracle函数

函数:
 字符函数 
  转化成小写LOWER(<C>)  转化成大写UPPER(<C>) select lower('aAbBcC') from dual;
 
 --------
 日期函数
  add_months(D,<I>)返回日期D加上i个月后的结果
   select add_month(sysdate,3)from dual;
  last_day(D)函数返回包含日期D的月份的最后一天
   select last_day(sysdate)from dual;
  .........
 -------
 分组函数
  AVG()返回平均值
  count(*)返回查询中行的数目 
  max()返回选择列表项目的最大值
  min()返回选择列表项目的最小值
  Select avg(sal),avg(distinct sal),max(sal),min(sal),
  sum(sal),count(*),count(sal),count(distinct sal),
  count(distinct comm),count(comm)
  from emp where deptno=30;
  --单列分组
  --显示每个部门的平均工资和最高工资
  Select deptno,avg(sal),max(sal) from emp
  group by deptno;
  ......

Oracle子查询

子查询
 单行子查询(single-row subqueries)
    使用的运算符号(=,>,<,>=,<=,<>)
  多行子查询(multiple-row subqueries)
    使用的运算符号(in,not in,exists,not exits,all,any)
   相关子查询(correlated subqueries)
    格式 select 列名,(select 语句) from 表名
   标量子查询(scalar subqueries)
    子查询是返回单行单列,格式同上
   多列子查询(multiple-column subqueries)
   在DDL语句中使用子查询
   在DML语句中使用子查询
--------
单行子查询
 --显示工资最高的雇员信息
 Select ename,deptno,sal from emp
 Where sal=(select max(sal) from emp);
--------
多行子查询
 --显示与部门编号为20的岗位相同的雇员信息
 Select ename,deptno,sal,job from emp
 Where job in (select distinct job from emp where deptno=20);
 --显示不与部门编号为20的岗位相同的雇员信息
 Select ename,deptno,sal,job from emp where ......

Legato备份oracle的文档整理

http://inthirties.com:90/viewthread.jsp?tid=1394
1 我们已经在备份服务器上建立了一个catalog库,具体的操作过程如下:
1)查询现在的数据库
# sqlplus /nolog.
SQL>connect / as sysdba;
Connected.
SQL>select * from v$tablespace;
TS# NAME INC
———- ——————- —
0 SYSTEM YES
1 UNDOTBS1 YES
2 TEMP YES
3 CWMLITE YES
4 INDX YES
5 TOOLS YES
6 USERS YES
7 XDB YES
8 rows selected.
SQL>; sellect name,bytes,status from v$datafile;
NAME————-BYTES STATUS———-
/oracle/product/10g/oradata/legato/system01.dbf 5242880 SYSTEM
/oracle/oradata/legato/system01.dbf 262144000 SYSTEM
/oracle/product/10g/oradata/legato/undotbs01.dbf 5242880 ONLINE
NAME———— BYTES STATUS———-
/oracle/oradata/legato/undotbs01.dbf 209715200 ONLINE
/oracle/product/10g/oradata/legato/cwmlite01.dbf 5242880 ONLINE
/oracle/oradata/legato/cwmlite01.dbf 20971520 ONLINE
NAME ......

oracle deterministic关键字

http://inthirties.com:90/viewthread.jsp?tid=1395
这个deterministic是不是很眼熟呀,
我们在online redefinition里见到过这个关键字,这个关键在在自定义的函数索引里也出现了。
先看看文档
DETERMINISTIC Clause
Specify DETERMINISTIC to indicate that the function returns the same
result value whenever it is called with the same values for its
arguments.
You must specify this keyword if you intend to call the function in
the expression of a function-based index or from the query of a
materialized view that is marked REFRESH FAST or ENABLE QUERY REWRITE.
When Oracle Database encounters a deterministic function in one of these
contexts, it attempts to use previously calculated results when
possible rather than reexecuting the function. If you subsequently
change the semantics of the function, you must manually rebuild all
dependent function-based indexes and materialized views.
Do not specify this clause to define a function that uses package
variables or that accesses the ......

如何修改Oracle默认用户密码有效期时间

如何修改Oracle默认用户密码有效期时间 1、查看用户的proifle是哪个,一般是default: sql>SELECT username,PROFILE from dba_users; 2、查看指定概要文件(如default)的密码有效期设置: sql>SELECT * from dba_profiles s WHERE s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME'; 3、将密码有效期由默认的180天修改成“无限制”: sql>ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; ......
总记录数:40319; 总页数:6720; 每页6 条; 首页 上一页 [1833] [1834] [1835] [1836] 1837 [1838] [1839] [1840] [1841] [1842]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号