凌晨乘机离境,hero s theme,咱们工人有力量 歌词
mysql> show create table index_tab01\G*************************** 1. row ***************************Table: index_tab01Create Table: CREATE TABLE `index_tab01` (`id` int(11) NOT NULL DEFAULT '0',`col01` varchar(10) NOT NULL DEFAULT '',`col02` text,UNIQUE KEY `index_un` (`col01`),KEY `indx_01` (`col01`)) ENGINE=InnoDB DEFAULT CHARSET=utf81 row in set (0.00 sec)
mysql> CREATE TABLE `copy_tab01` (-> `id` int(11) NOT NULL DEFAULT '0',-> `col01` varchar(10) NOT NULL DEFAULT '',-> `col02` text,-> UNIQUE KEY `index_un` (`col01`),-> KEY `indx_01` (`col01`)-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8-> ;Query OK, 0 rows affected (0.01 sec)
mysql> insert into copy_tab01 select * from index_tab01;Query OK, 4 rows affected (0.01 sec)Records: 4 Duplicates: 0 Warnings: 0
mysql> select * from copy_tab01;+----+--------+---------------+| id | col01 | col02 |+----+--------+---------------+| 0 | Name01 | This is Test! || 0 | Name02 | This is Test! || 0 | Name03 | This is Test! || 0 | Name04 | This is Test! |+----+--------+---------------+4 rows in set (0.00 sec)mysql> select * from index_tab01;+----+--------+---------------+| id | col01 | col02 |+----+--------+---------------+| 0 | Name01 | This is Test! || 0 | Name02 | This is Test! || 0 | Name03 | This is Test! || 0 | Name04 | This is Test! |+----+--------+---------------+4 rows in set (0.00 sec)
mysql> create table copy_tab02 like index_tab01;Query OK, 0 rows affected (0.00 sec)mysql> show create table copy_tab02\G*************************** 1. row ***************************Table: copy_tab02Create Table: CREATE TABLE `copy_tab02` (`id` int(11) NOT NULL DEFAULT '0',`col01` varchar(10) NOT NULL DEFAULT '',`col02` text,UNIQUE KEY `index_un` (`col01`),KEY `indx_01` (`col01`)) ENGINE=InnoDB DEFAULT CHARSET=utf81 row in set (0.00 sec)mysql> insert into copy_tab02 select * from index_tab01;Query OK, 4 rows affected (0.00 sec)Records: 4 Duplicates: 0 Warnings: 0mysql> select * from copy_tab02;+----+--------+---------------+| id | col01 | col02 |+----+--------+---------------+| 0 | Name01 | This is Test! || 0 | Name02 | This is Test! || 0 | Name03 | This is Test! || 0 | Name04 | This is Test! |+----+--------+---------------+4 rows in set (0.00 sec)
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
小白安装登录mysql-8.0.19-winx64的教程图解(新手必看)
Navicat连接MySQL时报10060、1045错误及my.ini位置问题
网友评论