I have some SQL code that needs to be executed if a certain View exists in a database. How would I go about checking if the View exists?
EDIT: The DBMS being used is Mic
For people checking the existence to drop View use this
View
From SQL Server 2016 CTP3 you can use new DIE statements instead of big IF wrappers
SQL Server 2016 CTP3
IF
syntax
DROP VIEW [ IF EXISTS ] [ schema_name . ] view_name [ ...,n ] [ ; ]
Query :
DROP VIEW IF EXISTS view_name
More info here