如何在 SQL Azure 中的另一列上重新创建聚集索引?

发布于 2024-12-10 18:09:28 字数 285 浏览 0 评论 0原文

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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陌上青苔 2024-12-17 18:09:28

不幸的是,你不能。

您必须创建一个具有相同结构和正确聚集索引的新表,插入数据,删除旧表,然后重命名新表。

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.

墨落成白 2024-12-17 18:09:28

我相信您可以在连接到 Azure 的 Navicat for SQL 中重建索引。

I believe you can rebuild indexes in Navicat for SQL connected to Azure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文