MySql Add Index : 0 Rows Affected

*爱你&永不变心* 提交于 2019-12-22 04:43:18

问题


Alter table table1 add index col1_idx (column1);

Even though the table1 has many rows and all of the have non null values for column1, the above query says "0 Rows AFfected". Why could this be?


回答1:


That is because the query is not directly affecting any rows as opposed to an update statement where you modify the row. It (very, very, very basically) only changes how the column is stored and sorted.



来源:https://stackoverflow.com/questions/10845197/mysql-add-index-0-rows-affected

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!