General Idea about Views in Sql Server 2005
Views are a virtual table, Like a real table, a view consists of a set of named columns and rows of data. Unless indexed, a view does not exist as a stored set of data values in a database. The rows and columns of data come from tables referenced in the Sql statement defining the view and are produced dynamically when the view is referenced.
Views can be used as security mechanisms by letting users access data through the view, without granting the users permissions to directly access the underlying base tables of the view
CREATE VIEW ViewTest AS SELECT Statement FROM tablename
In SQL Server 2005, you can create standard views, indexed views, and partitioned views.
Standard Views: Combining data from one or more tables through a standard view lets you satisfy most of the benefits of using views. These include focusing on specific data and simplifying data manipulation.
Indexed Views: An indexed view is a view that has been materialized. This means it has been computed and stored. You index a view by creating a unique clustered index on it. this views work best for queries that aggregate many rows.
CREATE VIEW testView WITH SCHEMABINDING AS SELECT select statement FROM tablename CREATE UNIQUE CLUSTERED INDEX index_testView ON testView(columnname)
Partitioned view: joins horizontally partitioned data from a set of member tables. A view that joins member tables on the same instance of SQL Server is a local partitioned view.
|
| Author: suhati gupta 28 May 2008 | Member Level: Silver Points : 2 |
very nice article...
|
| Author: hairat 28 May 2008 | Member Level: Bronze Points : 2 |
nice one
|
| Author: http://venkattechnicalblog.blogspot.com/ 06 Jun 2008 | Member Level: Diamond Points : 0 |
Gud one
Regards, Venkatesan Prabu . J
|
| Author: Mahesh Raj 07 Jun 2008 | Member Level: Gold Points : 1 |
This is very good information,Continue posting such useful articles.
|
| Author: thebarrett27 08 Jun 2008 | Member Level: Bronze Points : 0 |
hey nice article
|
| Author: Raju.M 08 Jun 2008 | Member Level: Gold Points : 1 |
i worked in View but i dont wats is that :( now am ok thank
|
| Author: Bunty 08 Jun 2008 | Member Level: Diamond Points : 0 |
Hi, Nice articles try to post such more.
|