CREATE VIEW Get_Pay WITH SCHEMABINDING AS SELECT FirstName, LastName, Phone, Pay, GetDate( ) FROM HumanResources.Employees

You have created a view with the following code:

CREATE VIEW Get_Pay WITH SCHEMABINDING AS SELECT FirstName, LastName, Phone, Pay, GetDate( ) FROM HumanResources.Employees

What changes do you need to make to this code to make this view indexable?

Answer – Change the code to look like this:
CREATE VIEW Get_Pay WITH SCHEMABINDING AS SELECT FirstName, LastName, Phone, Pay FROM HumanResources.Employees

 (You need the SCHEMABINDING option on a view that you intend to index, and three-part notation is not allowed. Nondeterministic functions return a different value every time they are called; deterministic functions return the same value every time they are called. Nondeterministic functions such as GETDATE( ) can’t be used in a view you intend to index.)