Saturday 17 February 2018

MSSQL - Delete view only if it exists

Watch this example on YouTube

This query will check if specified view exists and if yes - it will delete it

IF Exists(Select * From sys.views Where name= 'Your View Name')
Drop View TestView
Go

No comments:

Post a Comment