Answer Posted / sruthi
Index created on view is called as indexed view or
materialised view.
To create index on a view we should create a view
with "schemabinding"
eg:
create view v1 with schemabinding as
select empno,ename from dbo.emp
---
while creating view with schema binding refer to table by
default owner
---
now create index on that view
--
create clustered index i1 on v1(empno)
--
now this is called as indexed view
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is a benefit of using an after insert trigger over using a before insert trigger?
How to modify an existing user defined function?
Define Unique Key?
What is the difference between cartesian product and cross join?
What is a system database and what is a user database?
What new changes are being made in SQL Server?
What is data source in connection string?
What is page-level compression?
What is the use of @@spid?
What is query and its types?
What does it mean to be in union?
What is the purpose of indexing?
What is a bit datatype?
What is the sql case statement used for? Explain with an example?
How to list all triggers in the database with sys.triggers in ms sql server?