Materialized views in sql server with example

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

Share:

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:

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
(Visited 1,015 times, 1 visits today)



References : Devi Prasad (sqlserverlearner.com)

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.


Do you like my blog?

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




Write a comment



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