常用SQL

简介:

1、批量替换字符串

update 表名 set 字段名 = replace(字段名,'旧字符串','新字符串') 


2、插入

insert into 表名('旧字段1','旧字段2') valves ('对应字段数据1','对应字段数据2')


3、更新

update 表名 set 字段名 = '对应字段数'


4、删除(条件:字段名中包含ABC的)

delete from 表名 where 字段名 like '%'+'ABC'+'%'


5、



本文转自   yuxye   51CTO博客,原文链接:http://blog.51cto.com/fishvsfrog/1975207
相关文章
|
SQL Oracle 关系型数据库
|
SQL Oracle 关系型数据库
|
11小时前
|
SQL 存储 关系型数据库
关系型数据库SQL Server学习
【7月更文挑战第4天】
8 2
|
4天前
|
SQL 机器学习/深度学习 搜索推荐
SQL SERVER 转换失败
【6月更文挑战第25天】
|
5天前
|
SQL 存储 测试技术
|
7天前
|
SQL 存储 关系型数据库
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
|
7天前
|
SQL 关系型数据库 MySQL
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version