当前位置:网站首页>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')
边栏推荐
- level16
- ESP学习问题记录
- I2C bus timing explanation
- E-commerce data analysis -- salary prediction (linear regression)
- 高通&MTK&麒麟 手机平台USB3.0方案对比
- ARM PC=PC+8 最便于理解的阐述
- A possible cause and solution of "stuck" main thread of RT thread
- Reno7 60W超级闪充充电架构
- Use of lists
- Programmers can make mistakes. Basic pointers and arrays of C language
猜你喜欢

Mysql database interview questions

Mp3mini playback module Arduino < dfrobotdfplayermini H> function explanation

Programmers can make mistakes. Basic pointers and arrays of C language

Characteristics, task status and startup of UCOS III

open-mmlab labelImg mmdetection

JS regular expression basic knowledge learning

arduino JSON数据信息解析

ESP8266使用arduino连接阿里云物联网

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

Kconfig Kbuild
随机推荐
Comparison of solutions of Qualcomm & MTK & Kirin mobile platform USB3.0
Priority inversion and deadlock
Arduino uno R3 register writing method (1) -- pin level state change
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
Reno7 60W超级闪充充电架构
Raspberry pie tap switch button to use
优先级反转与死锁
Keyword inline (inline function) usage analysis [C language]
荣耀Magic 3Pro 充电架构分析
Gateway fails to route according to the service name, and reports an error service unavailable, status=503
Characteristics, task status and startup of UCOS III
Rough analysis of map file
Bubble sort [C language]
JS object and event learning notes
MySQL时间、时区、自动填充0的问题
Esp8266 uses Arduino to connect Alibaba cloud Internet of things
Use of lists
锂电池基础知识
Basic operations of databases and tables ----- view data tables
JS数组常用方法的分类、理解和运用