sql server check if view exists and drop code example Example: sql drop view if exists DROP VIEW IF EXISTS yourview;