Tuesday, October 2, 2012

Views in SQL Server


Views in SQL are used for data fetching. Views are just reference the definition of a table. And will refer the table directly when fetching the data. View cannot store the data. You can restrict the user for not shown up the security information. Instead of giving permission to table, create a view with the details of basic table and provide the appropriate permission to the view.
We can create view by join multiple tables’ and creates and indexed view will improve query performance.
Sample:

Create view vwmandal
as
select * from mandal

No comments: