Hi friends
I want to know that how to create and manage views in SQL Server. Please explain it with example.
Thank you
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satya KarkiPosted Nov 15, 2021, 4:38 PM
Jignesh TrivediPosted Apr 17, 2012, 11:26 PM
to create view MSSQL use following syntax,
CREATE VIEW Customers
AS
SELECT col1,col2,col3 FROM Table1
UNION ALL
SELECT col1,col2,col3 FROM table2
To manaview use ALTER statement.
hope this help.
SenthilkumarPosted Apr 17, 2012, 11:24 PM
The view is a virtual table, which can have the multiple columns from the one or more table. It can be used like the normal table. Normally view cannot store the data permanently in the table. When we create the view it stores the view definition schema as object under the concern database.
Let us see the syntax of the create view
CREATE VIEW View Name [Alias name1, name2,]
WITH ENCRYPTION
WITH SCHEMA BINDING
AS
SELECT statement [WITH CHECK OPTION]
The create view can be created with the view name and the alias can be given in the view name parameter parenthesis. The view schema can be stored in the encrypted format. Here is an option like SCHEMA BINDING; this is an important mile stone in the view to allow the developers to create the permanent view.
There are three types of views in the sql server 2005.
They are
I have written a article with lot of examples. you go here.
http://www.c-sharpcorner.com/uploadfile/skumaar_mca/views-in-sql-server-2005/
Satyapriya NayakPosted Apr 17, 2012, 11:16 PM
Please refer the below link
http://www.codeproject.com/Articles/38560/Overview-of-View-in-SQL-Server-2005
Thanks