C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Views in Sql Server 2005


Posted Date: 26 May 2008    Resource Type: Articles    Category: Databases

Posted By: Kapil Dhawan       Member Level: Gold
Rating:     Points: 10



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.





Responses

Author: suhati gupta    28 May 2008Member Level: Silver   Points : 2
very nice article...


Author: hairat    28 May 2008Member Level: Bronze   Points : 2
nice one


Author: http://venkattechnicalblog.blogspot.com/    06 Jun 2008Member Level: Diamond   Points : 0

Gud one

Regards,
Venkatesan Prabu . J


Author: Mahesh Raj    07 Jun 2008Member Level: Gold   Points : 1
This is very good information,Continue posting such useful articles.


Author: thebarrett27    08 Jun 2008Member Level: Bronze   Points : 0
hey nice article


Author: Raju.M    08 Jun 2008Member Level: Gold   Points : 1
i worked in View but i dont wats is that :( now am ok thank


Author: Bunty    08 Jun 2008Member Level: Diamond   Points : 0
Hi,
Nice articles try to post such more.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Errors in Sql Server 2005
Previous Resource: WildCards in Sql Server
Return to Discussion Resource Index
Post New Resource
Category: Databases


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

internet fax

Contact Us    Privacy Policy    Terms Of Use