Introduction to SQL View

9/14/2020 7:22:36 AM

Introduction to SQL View: A view is nothing more than saved SQL query. A view can also be considered as a virtual table. Views can be used to reduce the complexity of the database schema. Views can be used as a mechanism to implement row and column level security. Views can be used to present aggregated data and hide detailed data. Now given bellow the example code:

CREATE View vwEmployee
   SELECT Employee.Name, Employee.Phone,Salary.Salary
	FROM Employee
	INNER JOIN Salary ON Salary.Id=Employee.Id;

Select * from [dbo].[vwEmployee]

We can see the   vwEmployee view create by create keyword this view returns some table column value.  If we execute the view then we use the select keyword like table.