易截截图软件、单文件、免安装、纯绿色、仅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数据库中查看所有表SQL

select   table_name   from   user_tables;     //当前用户的表  
   
  select   table_name   from   all_tables;     //所有用户的表  
   
  select   table_name   from   dba_tables;   &n ......

Sybase数据库和oracle数据库用法


1 将数据库TEST完全导出,用户名system 密码manager 导出到D:daochu.dmp中
    exp system/manager@TEST file=d:daochu.dmp full=y
2 将数据库中system用户与sys用户的表导出
    exp system/manager@TEST file=d:daochu.dmp owner=(system,sys)
3 将数据库中的表inner_notify、notify_ ......

.bat启动数据库服务(MSSQL,Oracle)

 @echo off
:dosmenu
REM 选择菜单
echo  Windows 服务启动或关闭 By hope 2008年2月7日     
echo.
echo [1]启动Sql Server2005   [2]关闭Sql Server2005
echo [3]启动Oracle9i         [4]关闭Oracle9i
echo.
echo  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号