当前位置:网站首页>MySQL replacement field part content
MySQL replacement field part content
2022-07-06 12:17:00 【wx5caecf2ed0645】
[mysql]replace Usage of ( Replace part of a field )
[mysql]replace Usage of
1.replace into
replace into table (id,name) values('1','aa'),('2','bb')
The function of this statement is to table table Insert two records . If the primary key id by 1 or 2 Non existence is equivalent to
insert into table (id,name) values('1','aa'),('2','bb')
If the same value exists, no data will be inserted
2.replace(object,search,replace)
hold object It appears that search Replace all of them with replace
select replace('www.163.com','w','Ww')--->WwWwWw.163.com
example : Keep watch table Medium name In the field aa Replace with bb
update table set name=replace(name,'aa','bb')
3.UPDATE Update part of a field
Now the field of a record is “abcdefg", Now I just want to put... In this field c Change it to C,update How should the statement be written
update Table name set Field 1 = replace( Field 1,'c','C')
边栏推荐
- Cannot change version of project facet Dynamic Web Module to 2.3.
- Basic operations of databases and tables ----- creating data tables
- 程序员老鸟都会搞错的问题 C语言基础 指针和数组
- 冒泡排序【C语言】
- 记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
- ESP8266通过arduino IED连接巴法云(TCP创客云)
- Redis cache update strategy, cache penetration, avalanche, breakdown problems
- MySQL时间、时区、自动填充0的问题
- MySQL takes up too much memory solution
- Kconfig Kbuild
猜你喜欢

Whistle+switchyomega configure web proxy

【ESP32学习-2】esp32地址映射

Pytorch four commonly used optimizer tests

Oppo vooc fast charging circuit and protocol

Cannot change version of project facet Dynamic Web Module to 2.3.

【ESP32学习-1】Arduino ESP32开发环境搭建

优先级反转与死锁

高通&MTK&麒麟 手機平臺USB3.0方案對比

基于Redis的分布式锁 以及 超详细的改进思路

I2C总线时序详解
随机推荐
[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree
Common properties of location
Basic knowledge of lithium battery
RT-Thread 线程的时间片轮询调度
Mp3mini playback module Arduino < dfrobotdfplayermini H> function explanation
JS正则表达式基础知识学习
vim命令行笔记
MySQL占用内存过大解决方案
Gateway fails to route according to the service name, and reports an error service unavailable, status=503
Use of lists
C language, log print file name, function name, line number, date and time
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
Fashion Gen: the general fashion dataset and challenge paper interpretation & dataset introduction
Esp8266 connects to bafayun (TCP maker cloud) through Arduino IED
imgcat使用心得
MySQL時間、時區、自動填充0的問題
优先级反转与死锁
基于Redis的分布式ID生成器
Arduino uno R3 register writing method (1) -- pin level state change
Who says that PT online schema change does not lock the table, or deadlock