一.建立视图 IF OBJECT_ID('Sales.OrderTotalsByYear', 'V') IS NOT NULL DROP VIEW Sales.OrderTotalsByYear; GO 例一: CREATE VIEW Sales.OrderTotalsByYear WITH SCHEMABINDING , --在修改用于生成当前视图的表或视图时,一旦对当前视图产生影响(导致视图失效),则不允许修改. ENCRYPTION --加密,不能编辑(加密等级并不高) AS SELECT…