I have a table named EmployeeDetail.
SELECT [emp_fname]
,[emp_lname]
,[emp_no]
,[emp_add]
FROM [master].[dbo].[EmployeeDetail]
Output

Creating a View
Syntax
CREATE VIEW View_Name (Column_Name1,Column2..)
WITH ENCRYPTION
AS
Select_Statement [WITH CHECK OPTION ]
Now the following query defines the view.
Create view UpdateView
AS
SELECT Emp_Fname,
Emp_Lname,
Emp_no,
Emp_Add
FROM [EmployeeDetail]
Modifying Data Through a View
UPDATE UpdateView
SET emp_fname='Ram Kumar', emp_no=12
WHERE emp_add='Delhi';
SELECT * FROM EmployeeDetail
Output

ALTERING View
Using the ALTER VIEW statement you can modify a view without dropping it. We can modify the view using the following query:
DROPPING View
DROPPING Multiple Views
You can drop a single view or multiple views at a time.
Syntax
DROP VIEW view_name1, view_name2,..

azzouz thamerPosted Dec 13, 2012, 12:35 PM
thx