Downsides to “WITH SCHEMABINDING” in SQL Server?

后端 未结 10 526
天命终不由人
天命终不由人 2021-01-31 01:20

I have a database with hundreds of awkwardly named tables in it (CG001T, GH066L, etc), and I have views on every one with its \"friendly\" name (the view \"CUSTOMERS\" is \"SELE

10条回答
  •  长情又很酷
    2021-01-31 02:20

    One downside is that if you schemabind a view, it can only reference other schemabound views.

    I know this because I tried to schemabind a view and was met with an error message telling me it could not be schemabound because one of the other views it references is not also schemabound.

    The only consequence of this is that if you suddenly want to update a schemabound view to reference some new or existing view, you might have to schemabind that new or existing view as well. In that case, you won't be able to update the view, and you better hope your database developers know how to work with schemabound views.

提交回复
热议问题