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
相关文档:
使用unrecoverable创建表
create table new_emp as select * from emp unrecoverable;
create table new_emp as select * from emp nologging;
推荐使用logging或者nologging.
将表移动到新的数据段或新的表空间
通过移动来实现存储参数的修改
alter table emp move storage(initial 1m next 512k mimexte ......
Oracle 字段类型
字段类型
描述
字段长度及其缺省值
CHAR (size )
用于保存定长(size)字节的字符串数据。
每行定长(不足部分补为空格);最大长度为每行2000字节,缺省值为每行1字节。设置长度(size)前需考虑字符集为单字节或多字节。
VARCHAR2 (size )
用于保存变长的字符串数据。其中最大字节长 ......
今天了解了一下开源dspace软件,现将安装过程总结如下:
1、环境设置
1.1 下载jdk1.6.x并安装,安装时选择默认安装路径即可
一般为 C:\Program Files\Java\jdk1.6.0_10
设置JAVA_HOME,设置CLASSPATH和PATH
2、组件准备
......
@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 ......