DECLARE @runit INT SET @runit =0 SET NOEXEC OFF PRINT '1' IF @runit = 0 BEGIN PRINT 'Skipping Next Section' SET NOEXEC ON END GO PRINT '2' GO PRINT '3' GO PRINT '4' GO SET NOEXEC OFF PRINT '5' GO
Run the script twice, changing the value of @runit to 1 the second time. Cool huh?
MSDN : NOEXEC
No comments:
Post a Comment