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

oracle 的两个替换函数 REPLACE TRANSLATE


replace就是一般意义上的字符串替换,translate只是一个字符替换对应的一个字符,下面有手册说明,还有例子 O(∩_∩)O哈哈~
REPLACE
Syntax
Purpose
REPLACE returns char with every occurrence of search_string replaced with replacement_string. If replacement_string is omitted or null, then all occurrences of search_string are removed. If search_string is null, then char is returned.
Both search_string and replacement_string, as well as char, can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is in the same character set as char. The function returns VARCHAR2 if the first argument is not a LOB and returns CLOB if the first argument is a LOB.
REPLACE provides functionality related to that provided by the TRANSLATE function. TRANSLATE provides single-character, one-to-one substitution. REPLACE lets you substitute one string for another as well as to remove character strings.
Examples
The following example replaces occurrences of J with BL:
SELECT REPLACE('JACK and JUE','J','BL') "Changes"
from DUAL;
Changes
--------------
BLACK and BLUE
TRANSLATE
Syntax
PurposeTRANSLATE returns expr with all occurrences of each character in from_string replaced by its corresponding character in to_string.
Characters in expr that are not in from_string are not replaced. If expr is a character string, then you must enclose it in single
quotation marks. The argument from_string can contain more characters than to_string. In this case, the extra characters at the
end of from_string have no corresponding characters in to_string. If these extra characters appear in char, then they are removed
from the return value.
You cannot use an empty string for to_string to remove all characters in from_string from the return value. Oracle Database
interprets the empty string as null, and if this function has a null argument, then it returns null.
TRANSLATE provides functionality related to that provided by the REPLACE function


相关文档:

Oracle 11g SECUREFILES


Oracle 数据库 11g面向 DBA 和开发人员的重要新特性:SecureFiles:
1、SecureFiles:新 LOB 
了解如何使用新一代 LOB:SeureFiles。SecureFiles 集外部文件和数据库 LOB 方法的优点于一身,可以存储非结构化数据,允许加密、压缩、重复消除等等。 
数据库驻留 BLOBS 或 OS 文件 
您在 Oracle 数据库中 ......

Oracle常用的数据库字段类型如下:


字段类型
中文说明
限制条件
其它说明
CHAR
固定长度字符串
最大长度2000 bytes
 
VARCHAR2
可变长度的字符串
最大长度4000 bytes
可做索引的最大长度749
NCHAR
根据字符集而定的固定长度字符串
最大长度2000 bytes
 
NVARCHAR2
根据字符集而定的可变长度字符串
最大长度4000 bytes
  ......

Oracle Data Gurad Logical Standby 相关说明


一.逻辑Standby的准备工作
1  确认操作的对象和语句是否能被逻辑Standby支持
由于逻辑Standby是通过SQL应用来保持与Primary数据库的同步。SQL应用与REDO应用是有很大的区别,REDO应用实际上是在物理Standby端进行RECOVER;SQL应用则是分析重做日志文件中的REDO信息,并将其转换为SQL语句,在逻辑Standby端执 ......

从oracle表中随机取记录,产生随机数和随机字符串


1、从表中随机取记录
    select * from (select * from staff order by dbms_random.random)
    where rownum < 4
    表示从STAFF表中随机取3条记录
2、产生随机数
        SELECT DBMS_RANDOM.RANDOM from DUAL;
     ......

Oracle解锁以及常用基本操作

-----------------------------------------------------------------------------------
DOS:
1. sqlplus
2.
   用户名:sqlplus 、conn
   密码:as sysdba 、as sysdba  
解锁:
3. ALTER USER DBSNMP ACCOUNT UNLOCK;
解锁:system
4. alter user system identified by manage ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号