Add a unique index to Union view (SQL Server 2008)

I have a view that joins two tables using UNION ALL.

Is it possible to create a unique view in a view?

+3
source share
2 answers

No, you cannot create an indexed view if the view uses UNION, this was true in SQL 2000 and still true in 2008, see also http://msdn.microsoft.com/en-us/library/dd171921(SQL .100) .aspx

+4
source

Indexed views cannot contain an operator UNION: see here

+2
source

Source: https://habr.com/ru/post/1752929/


All Articles