当前位置:网站首页>[batch change MySQL table and corresponding codes of fields in the table]
[batch change MySQL table and corresponding codes of fields in the table]
2022-04-23 17:14:00 【ZHZHK001】
Batch change mysql Table and the corresponding codes of the fields in the table
--01、 Query all tables
select * from information_schema.`TABLES` where TABLE_SCHEMA = ' Data can be named ';
--02、 Copy table to excel in , adopt excel Generate multiline statements
--03、 Execute modification
alter table ` surface 1` convert to character set utf8;
alter table ` surface 2` convert to character set utf8;
alter table ` surface 3` convert to character set utf8;
--…………
The following is transcribed in the reference materials
-- Modify the encoding format of the table
ALTER TABLE `table` DEFAULT CHARACTER SET utf8;
-- Although the coding format of the table has been modified , However, the encoding format of the field has not been modified , No eggs
-- This method and use navicat Changing the encoding of a table is similar
-- Modify the encoding format of the field
ALTER TABLE `tablename` CHANGE ` Field name 1` ` Field name 2` VARCHAR(36) CHARACTER SET utf8 NOT NULL;
-- But you can only modify one field at a time , More trouble .
-- Modify the coding format of all fields in a table , Table and field change at the same time
alter table `tablename` convert to character set utf8;
-- Quite handy
Reference material :https://www.cnblogs.com/marx-luo/p/6713107.html
thank you !
版权声明
本文为[ZHZHK001]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230553251185.html
边栏推荐
- Detailed explanation of C webpai route
- SQL: How to parse Microsoft Transact-SQL Statements in C# and to match the column aliases of a view
- Understanding and small examples of unity3d object pool
- [C#] 彻底搞明白深拷贝
- 1-2 JSX syntax rules
- Multithreaded @ async thread pool
- Low code development platform sorting
- freeCodeCamp----shape_ Calculator exercise
- Understanding of RPC core concepts
- Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers
猜你喜欢
For the space occupation of the software, please refer to the installation directory
Nodejs installation and environment configuration
1-1 NodeJS
Detailed explanation of Milvus 2.0 quality assurance system
自定义my_strcpy与库strcpy【模拟实现字符串相关函数】
EF core in ASP Generate core priority database based on net entity model
. net type transfer
【WPF绑定3】 ListView基础绑定和数据模板绑定
oracle 中快速获取表的列名列表
Net standard
随机推荐
【解决报错】Error in v-on handler: “TypeError: Cannot read property ‘resetFields’ of undefined”
Baidu Map 3D rotation and tilt angle adjustment
Nacos + aspnetcore + Ocelot actual combat code
Website_ Collection
ClickHouse-表引擎
Decimal format decimal / datetime conversion processing
Go language, array, string, slice
Clickhouse table engine
About stream flow, write it down briefly------
C listens for WMI events
Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
Change the password after installing MySQL in Linux
ClickHouse-数据类型
Shell-sort命令的使用
【WPF绑定3】 ListView基础绑定和数据模板绑定
Low code development platform sorting
ASP. Net core reads the configuration file in the class library project
matlab如何绘制已知公式的曲线图,Excel怎么绘制函数曲线图像?
Perception of linear algebra 2
1-3 components and modules