C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
8
Reply
How to create view in sql server
Pawan Shukla
11y
1.7k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
create view myview as select * from mytable
Pawan Shukla
11y
1
Create view
AS --Write your Select Query here. --For naming convention use "vw_" before ViewName for User Defined ViewHope this'll help you.
Abhishek Yadav
11y
0
We have two types of Views in Sql Server. They are 1)Simple Views and 2) Complex Views Syntax for creating views CREATE VIEW vw_name AS SELECT column_names FROM table_nameSimple View: Simple Views are created on single table. In Simple Views, data can be Inserted, Updated and Deleted as shown in the below examples. Example on Simple View: --create view on single table create view vw_Employee as select empid,empname from [dbo].[employee]--select data from view select * from vw_Employee--insert data into simple view insert into [dbo].[vw_Employee] (empid,empname) values (101,'Roopa')--update data in simple view update vw_Employee set empname='Rani' where empid=1--delete data from simple view delete vw_Employee where empname='Rani'Complex View: If we are creating a view on more than one table it is know as Complex View. We can only update the Complex Views. Data cannot be inserted into or delete from Complex Views. Example on Complex View: --create view on multiple tables create view vw_Emp_Dept as select e.empid,e.empname,d.deptno,d.deptname from employee e inner join department d on e.empname= d.empname--select data from view select * from vw_Emp_Dept--update data in complex view update vw_Emp_Dept set deptno=20 where empname='Ravi'
Swarupa Mittapally
11y
0
http://dotnet-munesh.blogspot.in/2013/12/view-state-in-dot-net.html
Munesh Sharma
11y
0
http://www.aspdotnet-suresh.com/2012/11/viewstate-in-aspnet-with-example-in-c.html
Munesh Sharma
11y
0
hey pawan for more information please read my artical http://www.c-sharpcorner.com/UploadFile/8af593/view-in-sql-server/hope it helps youthanks and regards Abhijit patil
Abhijit Patil
11y
0
CREATE VIEW "viewname" AS --Select statement
Khan Abrar Ahmed
11y
0
CREATE VIEW
AS// SELECT QUERY HERE
Anupam Singh
11y
0
Message