如何在 SQL Azure 中的另一列上重新创建聚集索引?
SQL Azure 不仅要求每个表都有聚集索引,而且 不允许 < code>DROP INDEX 用于聚集索引。
现在我有一个表,该表在列 A
上错误地具有聚集索引,并且我希望它有一个而是在 B
列上建立聚集索引。
如果不允许删除聚集索引,如何在另一列上创建聚集索引?
SQL Azure not only requires each table to have a clustered index, but also disallows DROP INDEX
for clustered indices.
Now I have a table which erroneously has a clustered index on column A
and I want it to have a clustered index on column B
instead.
How do I create a clustered index on another column if dropping a clustered index is not allowed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,你不能。
您必须创建一个具有相同结构和正确聚集索引的新表,插入数据,删除旧表,然后重命名新表。
Unfortunately, you can't.
You'll have to create a new table with the same structure and correct clustered index, insert the data, drop the old table, and rename the new table.
我相信您可以在连接到 Azure 的 Navicat for SQL 中重建索引。
I believe you can rebuild indexes in Navicat for SQL connected to Azure.