images\cherry_red.png1 MySQL学习笔记
      images\cherry_blue.png1.1 LeetCode每日一题
         images\cherry_orange.png1.1.1 183. 从不订购的客户
      images\cherry_blue.png1.2 数据库特性
      images\cherry_blue.png1.3 正则表达式
         images\cherry_orange.png1.3.1 MySQL正则表达式
         images\cherry_orange.png1.3.2 Hive正则表达式
      images\cherry_blue.png1.4 MySQL基础操作语句
         images\cherry_orange.png1.4.1 增加
            images\cherry_cyan.png1.4.1.1 create
            images\cherry_cyan.png1.4.1.2 insert
         images\cherry_orange.png1.4.2 删除
            images\cherry_cyan.png1.4.2.1 drop
            images\cherry_cyan.png1.4.2.2 delete
         images\cherry_orange.png1.4.3 查询
         images\cherry_orange.png1.4.4 修改
            images\cherry_cyan.png1.4.4.1 update
            images\cherry_cyan.png1.4.4.2 alter
         images\cherry_orange.png1.4.5 基础操作命令
            images\cherry_cyan.png1.4.5.1 union
            images\cherry_cyan.png1.4.5.2 like
         images\cherry_orange.png1.4.6 复制表
         images\cherry_orange.png1.4.7 replace
      images\cherry_blue.png1.5 MySQL数据误删恢复
         images\cherry_orange.png1.5.1 docker远程连接MySQL报错
      images\cherry_blue.png1.6 MySQL主从之间的关系
         images\cherry_orange.png1.6.1 Binlog
      images\cherry_blue.png1.7 MySQL基本操作命令
         images\cherry_orange.png1.7.1 权限授予
         images\cherry_orange.png1.7.2 数据备份
         images\cherry_orange.png1.7.3 主从配置
         images\cherry_orange.png1.7.4 主从(主主)互用配置
         images\cherry_orange.png1.7.5 拉链表用途
            images\cherry_cyan.png1.7.5.1 拉链表
         images\cherry_orange.png1.7.6 字段类型转换
      images\cherry_blue.png1.8 Keepalived+MySQL 高可用架构
      images\cherry_blue.png1.9 HAproxy+MySQL 负载均衡
      images\cherry_blue.png1.10 Mycat+ MySQL 读写分离(高可用)优化
         images\cherry_orange.png1.10.1 Mycat配置文件详解
         images\cherry_orange.png1.10.2 安装配置Mycat
         images\cherry_orange.png1.10.3 MySQL分库操作
         images\cherry_orange.png1.10.4 Mycat测试实验
      images\cherry_blue.png1.11 MHA
         images\cherry_orange.png1.11.1 MHA初始化配置
      images\cherry_blue.png1.12 MySQL索引结构
      images\cherry_blue.png1.13 MySQL索引类型
      images\cherry_blue.png1.14 SQL执行计划(explain)
      images\cherry_blue.png1.15 SQL优化
      images\cherry_blue.png1.16 慢查询日志
      images\cherry_blue.png1.17 Druid监控
另一种完整复制表的方法:

CREATE TABLE targetTable LIKE sourceTable;
INSERT INTO targetTable SELECT * FROM sourceTable;

其他:

可以拷贝一个表中其中的一些字段:

CREATE TABLE newadmin AS
(
SELECT username, password FROM admin
)
可以将新建的表的字段改名:

CREATE TABLE newadmin AS
(
SELECT id, username AS uname, password AS pass FROM admin
)
可以拷贝一部分数据:

CREATE TABLE newadmin AS
(
SELECT * FROM admin WHERE LEFT(username,1) = 's'
)
可以在创建表的同时定义表中的字段信息:

CREATE TABLE newadmin
(
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY
)
AS
(
SELECT * FROM admin
)