How to check if the View exists in a SQL Server Database

To check if the View exists in a SQL Server Database, run the following code that checks the INFORMATION_SCHEMA.TABLES view:

IF EXISTS(
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'Schema_Name'
AND TABLE_NAME='View_Name'
AND TABLE_TYPE ='VIEW')
BEGIN
-- If the view exists, the code in this block will run.
PRINT 'The view exists!'
END

check_view_information_schema_tables

You will get the same result by running the following code that checks the INFORMATION_SCHEMA.VIEWS view:

IF EXISTS(
SELECT * FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_SCHEMA = 'Schema_Name'
AND TABLE_NAME='View_Name')
BEGIN
-- If the view exists, the code in this block will run.
PRINT 'The view exists!'
END

check_view_information_schema_views

Read related articles:
How to check if the Table exists in a SQL Server Database
How to check if the Column exists in a SQL Server Table
How to List all Views in a SQL Server Database