replace 函数用法如下:

replace('将要更改的字符串','被替换掉的字符串','替换字符串')

oracle 中chr()函数

CHR() --将ASCII码转换为字符
语法
CHR(number_code)
示例
select CHR(116) from dual;  --返回't'

几个常用的chr()函数:
chr(9) --制表符
chr(10) --换行符
chr(13) --回车符
chr(32) --空格符
chr(34) --双引号“"”

例:replace('111<br/>333444',chr(13)||chr(10), ' ')

CHR()有个对应的函数ASCII(),可以实现相反的作用。

ASCII() --将字符转换为ASCII码

语法 ASCII(single_character)

示例 select ASCII('t') from dual;  --返回116

ASCII表

Dec Hex Oct Char Description
0 0 000   null
1 1 001   start of heading
2 2 002   start of text
3 3 003   end of text
4 4 004   end of transmission
5 5 005   enquiry
6 6 006   acknowledge
7 7 007   bell
8 8 010   backspace
9 9 011   horizontal tab
10 A 012   new line
11 B 013   vertical tab
12 C 014   new page
13 D 015   carriage return
14 E 016   shift out
15 F 017   shift in
16 10 020   data link escape
17 11 021   device control 1
18 12 022   device control 2
19 13 023   device control 3
20 14 024   device control 4
21 15 025   negative acknowledge
22 16 026   synchronous idle
23 17 027   end of trans. block
24 18 030   cancel
25 19 031   end of medium
26 1A 032   substitute
27 1B 033   escape
28 1C 034   file separator
29 1D 035   group separator
30 1E 036   record separator
31 1F 037   unit separator
32 20 040   space
33 21 041 !  
34 22 042 "  
35 23 043 #  
36 24 044 $  
37 25 045 %  
38 26 046 &  
39 27 047 '  
40 28 050 (  
41 29 051 )  
42 2A 052 *  
43 2B 053 +  
44 2C 054 ,  
45 2D 055 -  
46 2E 056 .  
47 2F 057 /  
48 30 060 0  
49 31 061 1  
50 32 062 2  
51 33 063 3  
52 34 064 4  
53 35 065 5  
54 36 066 6  
55 37 067 7  
56 38 070 8  
57 39 071 9  
58 3A 072 :  
59 3B 073 ;  
60 3C 074 <  
61 3D 075 =  
62 3E 076 >  
63 3F 077 ?  
64 40 100 @  
65 41 101 A  
66 42 102 B  
67 43 103 C  
68 44 104 D  
69 45 105 E  
70 46 106 F  
71 47 107 G  
72 48 110 H  
73 49 111 I  
74 4A 112 J  
75 4B 113 K  
76 4C 114 L  
77 4D 115 M  
78 4E 116 N  
79 4F 117 O  
80 50 120 P  
81 51 121 Q  
82 52 122 R  
83 53 123 S  
84 54 124 T  
85 55 125 U  
86 56 126 V  
87 57 127 W  
88 58 130 X  
89 59 131 Y  
90 5A 132 Z  
91 5B 133 [  
92 5C 134 \  
93 5D 135 ]  
94 5E 136 ^  
95 5F 137 _  
96 60 140 `  
97 61 141 a  
98 62 142 b  
99 63 143 c  
100 64 144 d  
101 65 145 e  
102 66 146 f  
103 67 147 g  
104 68 150 h  
105 69 151 i  
106 6A 152 j  
107 6B 153 k  
108 6C 154 l  
109 6D 155 m  
110 6E 156 n  
111 6F 157 o  
112 70 160 p  
113 71 161 q  
114 72 162 r  
115 73 163 s  
116 74 164 t  
117 75 165 u  
118 76 166 v  
119 77 167 w  
120 78 170 x  
121 79 171 y  
122 7A 172 z  
123 7B 173 {  
124 7C 174 |  
125 7D 175 }  
126 7E 176 ~  
127 7F 177 DEL  

Oracle 中的replace函数的应用的更多相关文章

  1. Oracle中的单行函数

    Oracle中的单行函数 1 字符函数 UPPER()--将字符串转换为大写 SELECT UPPER('abc') FROM dual; LOWER()-将字符串转换为小写 SELECT LOWER ...

  2. 创建类似于Oracle中decode的函数

    -- 创建类似于Oracle中decode的函数create or replace function decode(variadic p_decode_list text[])returns text ...

  3. Oracle中的substr()函数 详解及应用

    注:本文来源于<Oracle中的substr()函数 详解及应用> 1)substr函数格式   (俗称:字符截取函数) 格式1: substr(string string, int a, ...

  4. Oracle中使用Table()函数解决For循环中不写成 in (l_idlist)形式的问题

    转: Oracle中使用Table()函数解决For循环中不写成 in (l_idlist)形式的问题 在实际PL/SQL编程中,我们要对动态取出来的一组数据,进行For循环处理,其基本程序逻辑为: ...

  5. Oracle中 Instr 这个函数

    http://www.jb51.net/article/42369.htm sql :charindex('字符串',字段)>0 charindex('administrator',MUserI ...

  6. 来一轮带注释的demo,彻底搞懂javascript中的replace函数

    javascript这门语言一直就像一位带着面纱的美女,总是看不清,摸不透,一直专注服务器端,也从来没有特别重视过,直到最近几年,javascript越来越重要,越来越通用.最近和前端走的比较近,借此 ...

  7. MySQL之实现Oracle中的rank()函数的功能

      假设表格为student, 数据如下:   我们要在MySQL中实现Oracle中的rank()函数功能,即组内排序,具体来说: 就是对student表中按照课程(course)对学生(name) ...

  8. oracle中的trim()函数详解

    1.先看一下Oracle TRIM函数的完整语法描述 TRIM([ { { LEADING | TRAILING | BOTH }[ trim_character ]| trim_character} ...

  9. oracle中的greatest 函数和 least函数

    oracle中的greatest 函数和 least函数 原文地址:https://blog.csdn.net/sinat_32023305/article/details/78778596    g ...

随机推荐

  1. viewflipper动画切换屏幕

    整个项目的 package com.example.viewflipper; import android.R.integer; import android.app.Activity; import ...

  2. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '

    mysql中如果字段使用了关键字,在插入和更新时会提示 You have an error in your SQL syntax; check the manual that corresponds ...

  3. pxe+kickstart实现无人值守批量安装linux

    pxe+kickstart实现无人值守批量安装linux 实验准备:主机myrhel2作为服务器端,新建一个没有安装操作系统的虚拟主机,而且其与服务器端在同一个网段 安装的条件: 服务器端:      ...

  4. CF Destroying Roads (最短路)

    Destroying Roads time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  5. centos下使用nohup

    Unix/Linux下一般比如想让某个程序在后台运行,很多都是使用 & 在程序结尾来让程序后台运行.比如我们要运行mysql在后台:/usr/local/mysql/bin/mysqld_sa ...

  6. poj 1695 动态规划

    思路:和黑书上的跳舞机类似 #include<map> #include<set> #include<cmath> #include<queue> #i ...

  7. PL/SQL在win7X 64下安装

    oracle11g怎么安装在此不作说明,网上到处都是,主要针对PL/SQL的安装配置 下载地址: PLSQL Developer: http://pan.baidu.com/s/1nt7G4cD X6 ...

  8. 包装BufferedReader的readLine()输出行号

    定义一个类,实现与被增强对象相同的接口,或继承这个类,视情况而定 定义一个变量,记住被增强的对象 定义一个构造函数,接收被增强的对象 覆盖要增强的方法 对于不需要增强的方法,调用被增强对象原有的方法 ...

  9. Struts2_搭建环境及HelloWorld

  10. Java之ConnectionPool连接池

    1.初始化(根据配置信息进行初始化)2.产生一个新的数据库连接3.有存储已经使用的连接集合,空闲连接集合4.提供给外部调用获取连接的方法5.提供给外部释放连接(不是关闭连接,而是将连接闲置)6.销毁连 ...