当前位置:网站首页>Oracle/PLSQL: Translate Function
Oracle/PLSQL: Translate Function
2022-06-27 01:35:00 【yuanlnet】
In Oracle/PLSQL, the translate function replaces a sequence of characters in a string with another set of characters. However, it replaces a single character at a time. For example, it will replace the 1st character in the string_to_replace with the 1st character in the replacement_string. Then it will replace the 2nd character in the string_to_replace with the 2nd character in the replacement_string, and so on.
Syntax
The syntax for the translate function is:
translate( string1, string_to_replace, replacement_string )
string1 is the string to replace a sequence of characters with another set of characters.
string_to_replace is the string that will be searched for in string1.
replacement_string - All characters in the string_to_replace will be replaced with the corresponding character in the replacement_string.
Applies To
- Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
For Example
translate('1tech23', '123', '456'); | would return '4tech56' |
translate('222tech', '2ec', '3it'); | would return '333tith' |
边栏推荐
- SystemVerilog simulation speed increase
- Keepalived 实现 Redis AutoFailover (RedisHA)14
- 为什么传递SPIF_SENDCHANGE标志SystemParametersInfo会挂起?
- 【系统分析师之路】第六章 复盘需求工程(案例论文)
- Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
- Summary of working at home during the epidemic | community essay solicitation
- 【毕业季】角色转换
- Structure the fifth operation of the actual camp module
- leetcode 1143. Longest Commom Subsequence 最长公共子序列(中等)
- Bootstrapblazor + FreeSQL actual combat chart usage (2)
猜你喜欢

ML:机器学习工程化之团队十大角色背景、职责、产出物划分之详细攻略

Weibo comments on high performance and high availability architecture

Modeling specifications: environment settings

C语言--职工信息管理系统设计

Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
在 IDEA 里看个书很过分嘛!

How to measure the thickness of glass substrate by spectral confocal

每日刷题记录 (五)

30 MySQL tutorial MySQL storage engine overview

XSS notes (Part 2)
随机推荐
UVM in UVM_ report_ Enabled usage
Amazon elasticache quickly builds a cache service cluster, which is fast
BS-GX-016基于SSM实现教材管理系统
getReader() has already been called for this request
Memcached foundation 1
numpy 数组运算机制浅探
递归是会更秀strtok
buuctf-pwn write-ups (6)
Memcached foundation 3
The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
Markdown table (consolidated)
The world is very big. Some people tattoo QR codes on their necks
JVM 的指针压缩
Due to the invalidation of the prospectus of bori technology, CICC has stopped providing guidance to it and abandoned the listing on the Hong Kong stock exchange?
UVM中uvm_config_db在sequence中的使用
NLP: brief introduction of transformer in NLP natural language field (pre training technology), NLP model development (elmo/gpt/bert/mt-dnn/xlnet/roberta/albert), detailed introduction to classic case
ThreadLocal详解
Pointer compression for JVM
The listing of Fuyuan pharmaceutical is imminent: the net amount raised will reach 1.6 billion yuan, and hubaifan is the actual controller
Memcached foundation 6