Sometimes in SSMS when I execute the below command I get the DDL command output in the result window. Any ideas what is causing this?
IF EXISTS (SELECT 1 FROM sys.views where name = 'XXX')
BEGIN
PRINT N'Dropping View XXX';
DROP VIEW XXX;
END
The above DROP VIEW XXX is output in the result tab in SSMS. I have also seen this output when the command is executed in SQLCMD as a script.
Thanks for the help.