当前位置:网站首页>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')
边栏推荐
- Types de variables JS et transformations de type communes
- inline详细讲解【C语言】
- A possible cause and solution of "stuck" main thread of RT thread
- ESP8266通过Arduino IDE连接Onenet云平台(MQTT)
- 选择法排序与冒泡法排序【C语言】
- ES6 grammar summary -- Part 2 (advanced part es6~es11)
- Basic knowledge of lithium battery
- VIM command line notes
- Fashion-Gen: The Generative Fashion Dataset and Challenge 论文解读&数据集介绍
- Redis cache update strategy, cache penetration, avalanche, breakdown problems
猜你喜欢
Redis based distributed locks and ultra detailed improvement ideas
ARM PC=PC+8 最便于理解的阐述
Kconfig Kbuild
基於Redis的分布式ID生成器
Feature of sklearn_ extraction. text. CountVectorizer / TfidVectorizer
基于Redis的分布式锁 以及 超详细的改进思路
(三)R语言的生物信息学入门——Function, data.frame, 简单DNA读取与分析
js 变量作用域和函数的学习笔记
Postman 中级使用教程【环境变量、测试脚本、断言、接口文档等】
Basic knowledge of lithium battery
随机推荐
Inline detailed explanation [C language]
I2C总线时序详解
1081 rational sum (20 points) points add up to total points
AMBA、AHB、APB、AXI的理解
MySQL time, time zone, auto fill 0
arduino UNO R3的寄存器写法(1)-----引脚电平状态变化
Fashion-Gen: The Generative Fashion Dataset and Challenge 论文解读&数据集介绍
Arduino get random number
js 变量作用域和函数的学习笔记
Learning notes of JS variable scope and function
Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0
ESP8266使用arduino连接阿里云物联网
Basic operations of databases and tables ----- classification of data
[esp32 learning-1] construction of Arduino esp32 development environment
Raspberry pie tap switch button to use
OSPF message details - LSA overview
MySQL時間、時區、自動填充0的問題
基于Redis的分布式锁 以及 超详细的改进思路
共用体(union)详解【C语言】
RT thread API reference manual