Is there a command in Microsoft SQL Server T-SQL to tell the script to stop processing? I have a script that I want to keep for archival purposes, but I don\'t want anyone t
RAISERROR with severity 20 will report as error in Event Viewer.
You can use SET PARSEONLY ON; (or NOEXEC). At the end of script use GO SET PARSEONLY OFF;
SET PARSEONLY ON; -- statement between here will not run SELECT 'THIS WILL NOT EXEC'; GO -- statement below here will run SET PARSEONLY OFF;