当前位置:网站首页>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')
边栏推荐
- MySQL time, time zone, auto fill 0
- ES6 grammar summary -- Part 2 (advanced part es6~es11)
- arduino JSON数据信息解析
- Pytorch four commonly used optimizer tests
- Redis based distributed ID generator
- [esp32 learning-1] construction of Arduino esp32 development environment
- Pytoch implements simple linear regression demo
- 程序员老鸟都会搞错的问题 C语言基础 指针和数组
- JS Title: input array, exchange the largest with the first element, exchange the smallest with the last element, and output array.
- Cannot change version of project facet Dynamic Web Module to 2.3.
猜你喜欢
几个关于指针的声明【C语言】
ARM PC=PC+8 最便于理解的阐述
ES6 grammar summary -- Part 2 (advanced part es6~es11)
RT thread API reference manual
Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
优先级反转与死锁
[esp32 learning-2] esp32 address mapping
Basic operations of databases and tables ----- view data tables
Whistle+switchyomega configure web proxy
Togglebutton realizes the effect of switching lights
随机推荐
Walk into WPF's drawing Bing Dwen Dwen
Inline detailed explanation [C language]
MySQL time, time zone, auto fill 0
Kconfig Kbuild
关键字 inline (内联函数)用法解析【C语言】
JS object and event learning notes
Arduino uno R3 register writing method (1) -- pin level state change
(一)R语言入门指南——数据分析的第一步
1081 rational sum (20 points) points add up to total points
Basic operations of databases and tables ----- classification of data
There are three iPhone se 2022 models in the Eurasian Economic Commission database
[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree
GCC compilation options
优先级反转与死锁
【ESP32学习-1】Arduino ESP32开发环境搭建
RuntimeError: cuDNN error: CUDNN_ STATUS_ NOT_ INITIALIZED
open-mmlab labelImg mmdetection
MySQL占用内存过大解决方案
Types de variables JS et transformations de type communes
ES6 grammar summary -- Part I (basic)