Microsoft SQL Server

VIEW in SQL Server

A view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with.

SQL CREATE VIEW Syntax

 CREATE VIEW view_name AS  
SELECT column_name(s)
FROM table_name
WHERE condition

Modify TABLE data through a VIEW

 UPDATE view_name  
SET column_name='Himen'
WHERE column_name= N'Patel' ;

Leave a comment