create precomputed result set

Creates precomputed result sets and the policies required to maintain them.

Syntax

create {precomputed result set | materialized view} 
	[owner_name.]prs_name [(alternative_column_name 
	[[constraint constraint_name] 
		unique (column_name,...)]
	[{immediate | manual} refresh]
	[{populate | nopopulate}]
	[enable | disable]
	[{enable | disable} use in optimization]
	[lock { datarows | datapages | allpages}]
	[on segment_name]
	[partition_clause]

as query_expression

Parameters

Examples

Usage

You must set these set parameters before you create or alter precomputed result sets:
  • set ansinull on

  • set arithabort on

  • set arithignore off

  • set string_rtruncation on

You cannot include a like clause with create precomputed result sets or create materialized view that includes an immediate refresh parameter.

Standards

The create precomputed result set command is a Transact-SQL extension and is not covered by the SQL standard.

Permissions

You must have create table and create view privileges to create precomputed result sets.

Auditing

Creating precomputed result sets is not audited.