当前位置:网站首页>更新数据表update
更新数据表update
2022-07-31 15:12:00 【小刘学安卓】
修改记录的方式汇总:
1、设置为新值:
UPDATE table_name SET column_name=new_value [, column_name2=new_value2] [WHERE column_name3=value3]2、根据已有值替换:
UPDATE table_name SET key1=replace(key1, '查找内容', '替换成内容') [WHERE column_name3=value3]思维扩展:第二种方式不仅可用于整体替换,还能做子串替换,例如要实现将tag中所有的PYTHON替换为Python(如CPYTHON=>CPython),可写作:
UPDATE examination_info
SET tag = REPLACE(tag, "PYTHON", "Python")
WHERE tag LIKE "%PYTHON%";
边栏推荐
- 工程水文学名词解释总结
- How useful is four-quadrant time management?
- OpenShift 4 - Deploy Redis Cluster with Operator
- R language moves time series data forward or backward (custom lag or lead period): use the lag function in the dplyr package to move the time series data forward by one day (set the parameter n to a p
- Groupid(artifact id)
- Efficient use of RecyclerView Section 3
- 四象限时间管理有多好用?
- 架构实战营模块8消息队列表结构设计
- Selenium自动化中无头浏览器的应用
- Bilateral filtering acceleration "recommended collection"
猜你喜欢
随机推荐
浏览器自带的拾色器
TRACE32 - C source code association
R语言ggstatsplot包ggbarstats函数可视化条形图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)、检验结果报告符合APA标准
Message queue data storage MySQL table design
最小费用最大流问题详解
ES6 类
名创优品斥资6.95亿购买创始人叶国富所持办公楼股权
button控件的使用
thread_local 变量的析构顺序
Essential Learning for Getting Started with Unity Shader - Transparency Effect
【CUDA学习笔记】初识CUDA
01 邂逅typescript,环境搭建
mongo进入报错
R语言计算时间序列数据的移动平均值(滚动平均值、例如5日均线、10日均线等):使用zoo包中的rollmean函数计算k个周期移动平均值
《微信小程序-进阶篇》Lin-ui组件库源码分析-Icon组件
数据库的范式(第一范式,第二范式,第三范式,BCNF范式)「建议收藏」
11 pinia use
微信聊天记录中搜索红包
Ubuntu Topic 5: Setting a Static IP Address
力扣:56. 合并区间








