nem.ec

Programming Information Security Recipes Personal Code Snippets

Drop a view (if it exists) and recreate it

IF OBJECT_ID('[dbo].[VIEW]', 'V') IS NOT NULL 
    drop view [dbo].[VIEW]
go 

create view [dbo].[VIEW] as [] 
go