Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set a primary key to a view?

Is it possible to set a primary key to a view in SQLServer 2008?

like image 849
Andre Nascentes Avatar asked Jun 17 '10 14:06

Andre Nascentes


1 Answers

You can create a clustered index on a SQL Server view - it's called an indexed view.

See Improving Performance with SQL Server 2008 Indexed Views for details.

like image 131
marc_s Avatar answered Nov 05 '22 11:11

marc_s