当前位置:网站首页>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')
边栏推荐
- JS變量類型以及常用類型轉換
- 锂电池基础知识
- Navigator object (determine browser type)
- Pytorch four commonly used optimizer tests
- Rough analysis of map file
- CUDA C programming authoritative guide Grossman Chapter 4 global memory
- C语言函数之可变参数原理:va_start、va_arg及va_end
- I2C总线时序详解
- Types de variables JS et transformations de type communes
- Togglebutton realizes the effect of switching lights
猜你喜欢

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

C语言回调函数【C语言】

I2C bus timing explanation

AMBA、AHB、APB、AXI的理解

Missing value filling in data analysis (focus on multiple interpolation method, miseforest)

JS变量类型以及常用类型转换

MP3mini播放模块arduino<DFRobotDFPlayerMini.h>函数详解

ES6 grammar summary -- Part 2 (advanced part es6~es11)

Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0

Gallery's image browsing and component learning
随机推荐
Use of lists
【ESP32学习-2】esp32地址映射
MySQL占用内存过大解决方案
基于Redis的分布式锁 以及 超详细的改进思路
Understanding of AMBA, AHB, APB and Axi
优先级反转与死锁
arduino UNO R3的寄存器写法(1)-----引脚电平状态变化
@Autowired 和 @Resource 的区别
关于Gateway中使用@Controller的问题
Esp8266 connects to bafayun (TCP maker cloud) through Arduino IED
Inline detailed explanation [C language]
STM32 how to locate the code segment that causes hard fault
E-commerce data analysis -- salary prediction (linear regression)
Gateway fails to route according to the service name, and reports an error service unavailable, status=503
Comparison of solutions of Qualcomm & MTK & Kirin mobile platform USB3.0
Kaggle competition two Sigma connect: rental listing inquiries (xgboost)
Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
Analysis of charging architecture of glory magic 3pro
列表的使用
冒泡排序【C语言】