Skip to content

Instantly share code, notes, and snippets.

@robkorv
Created September 25, 2013 08:44
Show Gist options
  • Save robkorv/6696816 to your computer and use it in GitHub Desktop.
Save robkorv/6696816 to your computer and use it in GitHub Desktop.
mssql drop view before creation
IF EXISTS (
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'vw_Name'
)
DROP VIEW [vw_Name]
GO
CREATE VIEW [vw_Name]
AS
SELECT GETDATE() Today
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment