MySql添加索引:0行受影响 [英] MySql Add Index : 0 Rows Affected

查看:512
本文介绍了MySql添加索引:0行受影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Alter table table1 add index col1_idx (column1);

即使table1有很多行,并且所有列都具有非空值,上面的查询说0行被发现。为什么会这样?

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?

推荐答案

这是因为查询不直接影响任何行,而不是您修改的更新语句这一排。它(非常,非常,非常基本)只改变列的存储和排序方式。

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.

这篇关于MySql添加索引:0行受影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆