Materialized views in sql server with example

Posted on : 04-06-2012 | By : Devi Prasad | In : SQL Server Basics

0



Materialized views in SQL Server are equivalant to Indexed views.

Below links have More details:
Creating indexed views in SQL Server
Advantages and disadvantages of indexed views

How to create materialized view in sql server?
Example:
[sql]
CREATE VIEW vwTest
WITH SCHEMABINDING
AS
SELECT id, name FROM Products where id > 1000

GO

–Create an index on the view.
CREATE UNIQUE CLUSTERED INDEX ix_vwTest
ON vwTest (id)
GO
[/sql]




Reference : Devi Prasad (sqlserverlearner.com)

Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.



Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.




Your Ad Here


Tags: , , , , , , , , , , , , ,