Using the select statement with create view

The select statement in the create view statement defines the view. You must have permission to select from any objects referenced in the select statement of a view you are creating.

You can create a view using more than one table and other views by using a select statement of any complexity.

There are a few restrictions on the select statements in a view definition:

After you create a view, the source text describing the view is stored in the text column of the syscomments system table.

NoteDo not remove this information from syscomments. Instead, encrypt the text in syscomments with sp_hidetext. See the Reference Manual: Procedures and “Compiled objects”.