当前位置:网站首页>[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
边栏推荐
- Simulation of infrared wireless communication based on 51 single chip microcomputer
- Using quartz under. Net core - [1] quick start
- Some problems encountered in recent programming 2021 / 9 / 8
- Signalr can actively send data from the server to the client
- Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
- Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers
- Promise (IV)
- Freecodecamp ---- budget & category exercise
- Input file upload
- About stream flow, write it down briefly------
猜你喜欢
XTask与Kotlin Coroutine的使用对比
Smart doc + Torna generate interface document
Feign report 400 processing
Using quartz under. Net core -- job attributes and exceptions of [4] jobs and triggers
Get the column name list of the table quickly in Oracle
Devexpress GridView add select all columns
ASP. NET CORE3. 1. Solution to login failure after identity registers users
Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
Webapi + form form upload file
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
随机推荐
[registration] tf54: engineer growth map and excellent R & D organization building
Further optimize Baidu map data visualization
For the space occupation of the software, please refer to the installation directory
JS failed to change all variables and changed to the return method. Finally, the problem was solved
Shell-cut命令的使用
Change the password after installing MySQL in Linux
Paging the list collection
Lock锁
Use of shell cut command
About stream flow, write it down briefly------
Sub database and sub table & shardingsphere
Interface document yaml
Abnormal resolution of Xiaomi camera
Decimal format decimal / datetime conversion processing
CentOS MySQL multi instance deployment
Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers
Clickhouse table engine
[logical fallacy in life] Scarecrow fallacy and inability to refute are not proof
Deep understanding of control inversion and dependency injection
websocket