Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>create table t1(id int, name varchar(100)); alter table t11 add index name_idx(name); mysql&gt; show create table t11; +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | t11 | CREATE TABLE `t11` ( `id` int(11) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, KEY `name_idx` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) alter table t11 change column name name1 varchar(100); mysql&gt; show create table t11; +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | t11 | CREATE TABLE `t11` ( `id` int(11) DEFAULT NULL, `name1` varchar(100) DEFAULT NULL, KEY `name_idx` (`name1`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) </code></pre> <p><strong>mysql will auto change the indexes for u and does not rebuild index</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload