View is a virtual table for the original table. It doen't store the physical data in memory, just stores query which is used while creating view.
Puporse of View:
The manipulations in views
will impact dependent base tables. It depends on the type of view.
Some examples to use the Views in SQL Server are:
1. Maintaing sensitive data: if u have any sensitive data as part of a table and u does not want to reveal/access sensitive data to some users then u can consider views.
Solution: create view by removing sensitive columns and grant view access to the users
2. Cross-database manipulations : you can refer other database objects in the view and the view manipulations will effect the base tables
Use Database1
GO
CREATE VIEW vw_TestSample
AS
SELECT Col1, col2 FROM Database2.dbo.SampleTable
GO
The view manipulations on the above view( it is in database1) will effect the base table
SampleTable in database2
Refer the below link for knowing the purpose of Views in SQL Server
http://www.toadworld.com/platforms/sql-server/w/wiki/10274.views-advantages-and-disadvantages.aspx C
Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif
Kasani007, if this helps please login to Mark As Answer. | Alert Moderator