Posted By

hoffstein on 10/14/08


Tagged

tsql


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hoffstein


TSQL delete view if it already exists


 / Published in: SQL
 

  1. IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'v_MyView') BEGIN
  2. DROP VIEW dbo.v_MyView
  3. PRINT 'Dropped dbo.v_MyView'
  4. END

Report this snippet  

You need to login to post a comment.