当前位置:网站首页>Export MySQL table data in pure mode
Export MySQL table data in pure mode
2022-07-06 22:27:00 【Maple Leaf pear flower】
Sometimes I want to guide my watch , Is to export the data of a table , Then import to another table , But directly mysqldump The table data exported by this command , Not clean enough , Can't import directly , So use some parameters to filter information . The following statement can export data cleanly
mysqldump -uroot -h 127.0.0.1 -proot --databases test --tables user_info --where "id > 3" --default-character-set gbk --skip-comments --no-create-info --no-create-db --skip-add-drop-table --skip-add-locks --skip-disable-keys --skip-extended-insert --set-gtid-purged=off -c > C:\Users\Breeze\Desktop\test.sql
Data in the original table 
Derived SQL File data
/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES gbk */;
/*!40103 SET @[email protected]@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
INSERT INTO `user_info` (`id`, `name`, `age`) VALUES (4,'Dave',24);
INSERT INTO `user_info` (`id`, `name`, `age`) VALUES (5,'Eva',24);
INSERT INTO `user_info` (`id`, `name`, `age`) VALUES (6,'Maybe',27);
/*!40103 SET [email protected]_TIME_ZONE */;
/*!40101 SET [email protected]_SQL_MODE */;
/*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */;
/*!40014 SET [email protected]_UNIQUE_CHECKS */;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
/*!40111 SET [email protected]_SQL_NOTES */;
Aforementioned SQL The file is relatively clean SQL Script statements
--default-character-set gbkSet the encoding set , Prevent Chinese data from being garbled--skip-commentsUncomment information--no-create-infoExport data only , Do not export table creation statements--no-create-dbExport data only , Do not export database creation statements--skip-add-drop-tableskipdropsentence-skip-add-locksCancel adding... Before each table exportLOCK TABLES--skip-disable-keysExport less output information ( For debugging ). Get rid of the comments and the head and tail structures . Options available :--skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys--skip-extended-insertUse with multiple VALUES Column INSERT grammar .
边栏推荐
- What are the interface tests? What are the general test points?
- 2022-07-05 stonedb的子查询处理解析耗时分析
- Chapter 3: detailed explanation of class loading process (class life cycle)
- AI 企业多云存储架构实践 | 深势科技分享
- 将MySQL的表数据纯净方式导出
- UDP编程
- 2022-07-05 使用tpcc对stonedb进行子查询测试
- Maximum product of three numbers in question 628 of Li Kou
- const关键字
- Classification, function and usage of MySQL constraints
猜你喜欢

Netxpert xg2 helps you solve the problem of "Cabling installation and maintenance"

C # réalise la liaison des données du rapport Crystal et l'impression du Code à barres 4

2020 Bioinformatics | GraphDTA: predicting drug target binding affinity with graph neural networks

Aardio - 利用customPlus库+plus构造一个多按钮组件

微信红包封面小程序源码-后台独立版-带测评积分功能源码

CCNA Cisco network EIGRP protocol

Classic sql50 questions

新手程序员该不该背代码?
![[线性代数] 1.3 n阶行列式](/img/6e/54f3a994fc4c2c10c1036bee6715e8.gif)
[线性代数] 1.3 n阶行列式

C#實現水晶報錶綁定數據並實現打印4-條形碼
随机推荐
【雅思口语】安娜口语学习记录part1
zabbix 代理服务器 与 zabbix-snmp 监控
NPDP certification | how do product managers communicate across functions / teams?
3DMax指定面贴图
General implementation and encapsulation of go diversified timing tasks
12、 Start process
Installation and use of labelimg
[leetcode daily clock in] 1020 Number of enclaves
Memorabilia of domestic database in June 2022 - ink Sky Wheel
C#实现水晶报表绑定数据并实现打印4-条形码
C#實現水晶報錶綁定數據並實現打印4-條形碼
Inno Setup 打包及签名指南
The nearest common ancestor of binary (search) tree ●●
2021 geometry deep learning master Michael Bronstein long article analysis
雅思口语的具体步骤和时间安排是什么样的?
Embedded common computing artifact excel, welcome to recommend skills to keep the document constantly updated and provide convenience for others
CCNA Cisco network EIGRP protocol
CCNA-思科网络 EIGRP协议
[sciter]: encapsulate the notification bar component based on sciter
signed、unsigned关键字