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

Oracle 最常用功能函数经典汇总

  * SQL Group Function
*
s (num can be a column or ex
pression)          
  (null values are ign
*
ored, default between distin
ct and all is all)      
  ********************
***************
****************************
****************
  AVG([distinct or all] num)   
-- average value
  COUNT(distinct or all] num)  
-- number of values
  MAX([distinct or all
] num)   -- maximum value
  MAX([distinct or all] num)   
-- minimum value
  STDDEV([distinct or
all] num)  -- standard devi
ation
  SUM([distinct or all
] num)   -- sum of values
  VARIANCE([distinct o
r all] num) -- variance of v
alues
   
  ********************************
***********************
************************
  * Miscellaneaous Functions :  
*
                       
  ********************
***************
****************************
****************
  DECODE(expr, srch1,
return1 [,srch2, return2...]
, default]
      -- if no search matches t
he expression then the default is returned,
      -- otherwise,
the first search that match
es will cause
      -- the corres
ponding return value to be r
eturned
  DUMP(column_name [,fmt [,start_p
os [, length]]])
     -- returns an
column
internal oracle format, used
for getting info about a
     -- format options : 8 = oc
tal, 10 = decimel, 16 = hex, 17 = characters
     -- return type
codes : 1 = varchar2, 2 = n
umber, 8 = long, 12 = date,
     --  23 = raw,
24 = long raw, 69 = rowid,
96 = char, 106 = mlslabel
  GREATEST(expr [,expr2 [, expr3...]]
     -- returns the largest val
ue of all expressions
  LEAST(expr [,expr2 [, expr3...]]
     -- returns the
smallest value of all expre
ssions
  NVL(expr1 ,expr2
     -- if expr1 is not null, i
t is returned, otherwise expr2 is returned
  SQLCODE
     


相关文档:

详细介绍ORACLE sqlplus命令

 
一、ORACLE的启动和关闭
1、在单机环境下要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下
su - oracle
a、启动ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b、关闭ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>shutdow ......

sql语句归纳(oracle)

对日常工作中用到的感觉有用的sql语句做个归纳,用于今后温故知新。
*复制表:
create table tablename  as  select * from table_src;
create table tablename  as  select * from table_src where 1 <> 1; --只复制表结构 ......

oracle数据类型number

Oracle使用标准、可变长度的内部格式来存储数字。这个内部格式精度可以高达38位。
    NUMBER数据类型可以有两个限定符,如:
    column NUMBER ( precision, scale)
    precision表示数字中的有效位。如果没有指定precision的话,Oracle将使用38作为精度。
&nb ......

ORACLE查询或删除时指定使用索引的写法­

 查询时可以指定使用索引的写法。­
­
SELECT   /*+ index(TB_ALIAS IX_G_COST3) */­
  TB_ALIAS.*­
  from g_Cost TB_ALIAS­
WHERE Item_Two = 0­
   AND Flight_Date >= To_Date('20061201', 'YYYYMMDD')­
   AND Flight_D ......

ORACLE数据导入到指定的表空间

create user 用户名 identified by 密码 default tablespace 缺省表空间 Temporary tablespace 临时表空间;­
­
grant connect,resource,dba to 用户名;­
  ­
revoke unlimited tablespace from 用户名;­
  ­
alter user 用户名 quota 0 on Users;­
­
alter user 用户名 quot ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号