Database Reference
In-Depth Information
FigureĀ 8-16: A sample table.
Creating a view
To create a view in SQL Server, follow these steps:
1. Right-click the Views folder in the Object Explorer window and select New View.
The Add Tables dialog box opens, as shown in FigureĀ 8-17, so you can add tables to your view.
We're using the AdventureWorksDW database for the purposes of these steps.
2. Select the tables you want to add to your view and click the Add button.
In this case we selected the DimCustomer , DimDate , DimGeography , and
FactInternetSales tables. SQL Server automatically brings the selected tables in the
relationship window and shows the resulting SQL below it.
3. Click the columns that you want to add to your view.
 
Search WWH ::




Custom Search