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

ORACLE函数大全


SQL中的单记录函数
1.ASCII
返回与指定的字符对应的十进制数;
SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;
        A         A      ZERO     SPACE
--------- --------- --------- ---------
       65        97        48        32
2.CHR
给出整数,返回对应的字符;
SQL> select chr(54740) zhao,chr(65) chr65 from dual;
ZH C
-- -
赵 A
3.CONCAT
连接两个字符串;
SQL> select concat('010-','88888888')||'转23'  高乾竞电话 from dual;
高乾竞电话
----------------
010-88888888转23
4.INITCAP
返回字符串并将字符串的第一个字母变为大写;
SQL> select initcap('smith') upp from dual;
UPP
-----
Smith
5.INSTR(C1,C2,I,J)
在一个字符串中搜索指定的字符,返回发现指定的字符的位置;
C1    被搜索的字符串
C2    希望搜索的字符串
I     搜索的开始位置,默认为1
J     出现的位置,默认为1
SQL> select instr('oracle traning','ra',1,2) instring from dual;
 INSTRING
---------
        9
6.LENGTH
返回字符串的长度;
SQL> select name,length(name),addr,length(addr),sal,length(to_char(sal)) from gao.nchar_tst;
NAME   LENGTH(NAME) ADDR             LENGTH(ADDR)       SAL LENGTH(TO_CHAR(SAL))
------ ------------ ---------------- ------------ --------- --------------------
高乾竞            3 北京市海锭区                6   9999.99                  &nbs


相关文档:

Oracle 1z0 047 Exam


Exam Number/Code : 1z0-047
Exam Name : Oracle Database SQL Expert
Questions and Answers : 278 Q&As
Update Time: 2010-04-15
1. Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
A. The nested query executes after the outer query returns th ......

Oracle 1z0 047 Exam


Exam Number/Code : 1z0-047
Exam Name : Oracle Database SQL Expert
Questions and Answers : 278 Q&As
Update Time: 2010-04-15
1. Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
A. The nested query executes after the outer query returns th ......

Oracle 1z0 047 Exam


Exam Number/Code : 1z0-047
Exam Name : Oracle Database SQL Expert
Questions and Answers : 278 Q&As
Update Time: 2010-04-15
1. Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
A. The nested query executes after the outer query returns th ......

oracle与sqlserver插入数据动态字段值

记录一下以备下次快速找到。。。
       往tb_wf_privgrant表中插入一条记录,workflow_id字段值从tb_wf_workflow 表中获取workflow_name='知识审核'的所有记录中workflow_id最大值。
--oracle
declare   a NUMBER(10);
   begin
   select  max(wo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号