Check a view against sys.views : sys.views « System Tables Views « SQL Server / T-SQL Tutorial






IF EXISTS(SELECT *
    FROM sys.views
    WHERE name = 'vS' AND schema_id =
              SCHEMA_ID('HumanResources'))
    DROP VIEW HumanResources.vS
GO








27.21.sys.views
27.21.1.Reporting on Database Views by joining sys.columns and sys.views
27.21.2.Query sys.views
27.21.3.Check a view against sys.views