The following example creates a view and an index on that view, in theAdventureWorksdatabase. SQLCopy --Set the options to support indexed views.SETNUMERIC_ROUNDABORTOFF;SETANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLSON;--Create view with SCHEMA...
SET NUMERIC_ROUNDABORT OFF; SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON; --Create view with SCHEMABINDING. IF OBJECT_ID('Sales.vOrders', 'view') IS NOT NULL DROP VIEW Sales.vOrders; GO CREATE VIEW Sales.vOrders WITH SCHEMABINDING ...
The following example creates a view and an index on that view, in theAdventureWorksdatabase. SQLKopija --Set the options to support indexed views.SETNUMERIC_ROUNDABORTOFF;SETANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLSON;--Create view with SCHE...