Creating Views Using T-SQL
CREATE VIEW statement is used to create views with T-SQL. The syntax for the
CREATE VIEW statement follows:
This statement and the related options are essentially the same in SQL Server 2008 as they were in SQL Server 2005 and SQL Server 2000. We first look at a simple example for creating a view with T-SQL and then delve into several other examples that utilize the view attributes. Listing 27.2 shows a sample T-SQL statement for creating a simple view.
There are several ...