Creating View Visually in SQL Server 2008

In this article, we will see how to create a view visually in SQL Server 2008.
  • 2390

Introduction

In this article I will explain how to create sql view virtually. View in SQL is a virtual table and this table is created on the result set of SQL statement. View is similar to a normal table and also have rows and columns. View may be combination  of some rows and columns of two or more than two tables.

Steps to create view visually

Step 1

Open Object Explorer in SQL Server Management Studio and right-click on Views under the databases and select "New View".

Output:

OpenNewView.jpg

Step 2

The "Add table" window will be opened. Select table of which you want to create view. And click on "Add" button.

Output:

selectTableTo-make-view.jpg

Step 3

A window will appear as following:

Output:

View-in-sql.jpg

Step 4

The available tables have no relation among them. Now select columns to relate one table to another.

Output:

selectColumnsForView.jpg

Step 5

Now right click on the query window and select "Execute". And see output:

tableCreated-in-view.jpg

© 2020 DotNetHeaven. All rights reserved.