无法在架构绑定对象内指定索引提示
当我更改视图时,我收到此错误消息 “无法在架构绑定对象中指定索引提示。”
我该怎么做才能解决这个问题?
I receive this error message when I altered my view
"Index hints cannot be specified within a schema-bound object."
How can I do for solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
索引视图无法更改;它们必须被丢弃并重新创建。
Indexed views cannot be altered; they have to be dropped and re-created.
我遇到了同样的问题,那是因为您在 ALTER VIEW vw_MyView 之后有WITH SCHEMABINDING 选项。删除该条款,它将允许您进行更改。虽然我已经删除并重新创建了视图,但只有在删除了“WITH SCHEMABINDING”选项后才起作用。
I had the same issue and thats because you are having WITH SCHEMABINDING option after ALTER VIEW vw_MyView. Remove that clause and it will allow you to alter. Although I have dropped and recreated the view but only worked after I removed WITH SCHEMABINDING option.