A quick reference of the keywords a view definition must not contain if you want an indexed view in SQL Server, part 10 of my views series.
Finding the Nearest Location With a Spatial Index
A nearest location query in SQL Server needs TOP, STDistance in WHERE and ORDER BY, matching SRIDs, and a checked spatial plan.
Percent of Total With SUM() OVER() in One Query
Calculate percent of total with SUM() OVER(), group and running shares, safe numeric division, and checks for zero totals.
REPLACE With COLLATE: Choose Case Matching Explicitly
REPLACE with COLLATE controls which substrings match. Preview case-dependent results before applying a text replacement policy.
Contained Database Users: Logins That Move With the Database
Use contained database users to move authentication with a database, inspect prerequisites, test connections, and review access ownership.
SQL SERVER – Index Created on View not Used Often – Limitation of the View 3
An Index Created on a view does not always stop queries from reading the base table. Limitation 3 of views, shown with a simple example.







