Created
December 16, 2015 17:38
-
-
Save default-kramer/8778347941e5e6fa1e96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists(select * from INFORMATION_SCHEMA.ROUTINES where ROUTINE_NAME = 'DropView') | |
drop procedure DropView; | |
go | |
create procedure DropView | |
@viewname varchar(99) | |
as | |
if exists(select * from INFORMATION_SCHEMA.VIEWS where TABLE_NAME = @viewname) | |
exec('drop view ' + @viewname); | |
go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment