TSQL check if a view exists before create it
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'vw_abc')
DROP VIEW [dbo].[vw_abc]
Achievement provides the only real pleasure in life
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'vw_abc')
DROP VIEW [dbo].[vw_abc]
Posted by SF at 11:47 am
No comments:
Post a Comment