Restrictions for using views.
You can create a view only in the current database.
The number of columns referenced by a view cannot exceed 1024.
You cannot create a view on a temporary table.
You cannot create a trigger or build an index on a view.
You cannot use readtext or writetext on text, unitext, or image columns in views.
You cannot include order by, compute clauses, or the keyword into in the select statements that define views.
You cannot update, insert, or delete from a view with select statements that include the union operator.
If you create a view using a local or a global variable, the SAP ASE server issues error message 7351: “Local or global variables not allowed in view definition.”
You can combine create view statements with other SQL statements in a single batch.
if not exists (select * from sysobjects where name="mytable") begin execute ("create table mytable (x int)") end