• Mighty (5/27/2013)


    Nice start of the week.

    One remark though:

    ...if you run code that generates an actual error

    This not only works when an error has been generated. Any message that is returned will enable it like the famous

    (1 row(s) affected)

    True, but since there is no way to manually apply formatting in the messages pane (as far as I know), the replacement text you type would still be in black.

    If you want the text in red, you need to ensure that SQL Server first puts a text in red there, then edit it. Depending on how you edit it, you can still lose the red color, or you can retain it.

    Nice question! I was surprised that it's not in the "fun" category, nor worth seven points - that was what I expected when I saw the question.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/