codebrothers.net :: Home  >  Matthias Denkmaier
User: Guest  Login
Matthias Denkmaier
C# - what else?
Blog search:  
Error 1939 when trying to create an index on View in SQL Server 2005

When you try to create an index on a column belonging to a view you receive the following error:

 

Error: sql server error 1939: The Index cannot be created because the view is not bound to a schema

 

The solution is fairly simple. You have to use the option “WITH SCHEMABINDING” when creating the view, like this:

 

CREATE VIEW [dbo].[DummyView] WITH SCHEMABINDING ...

 

Note: Some requierements have to be fulfilled before you can create a view with schema binding. Details can be found in the SQL Server Help.

 

Share this post: Email it!
Posted:  12.03.2007 23:01:14  by  mdenkmaier
Tags:  SQLDevelopment
Comments are not allowed on this item!