易截截图软件、单文件、免安装、纯绿色、仅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分页查询SQL语法


--1:无ORDER BY排序的写法。(效率最高) ­
--(经过测试,此方法成本最低,只嵌套一层,速度最快!即使查询的数据量再大,也几乎不受影响,速度依然!) ­
SELECT * ­
  from (Select ROWNUM AS ROWNO, T.* ­
           from k_task T &s ......

SQL Server和Oracle常用函数对比


数学函数
1.绝对值
S:select abs(-1) value
O:select abs(-1) value from dual
2.取整(大)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.取整(小)
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.取整(截取)
S:select cast(-1.002 as in ......

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 ......

关于oracle字符集


 
分类:Oracle
一.引言
    ORACLE数据库字符集,即Oracle全球化支持(Globalization Support),或即国家语言支持(NLS)其作用是用本国语言和格式来存储、处理和检索数据。利用全球化支持,ORACLE为用户提供自己熟悉的数据库母语环境,诸如日期格式、数字格式和存储序列等。Oracle可以支持 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号