Thank you for the post, Steve, good one.
(but confusing... for me. I like to see an example of printf style and then the same written in throw line. I thought of usage of %s %d... that kind of stuff, which we can add via sp_addmessage and then using formatmessage and the error number we can use it. like the below
DECLARE @Message NVARCHAR(2048);
SELECT @Message = FORMATMESSAGE(1127);
THROW 50001, @Message, 1;
or did you mean the usage of printf style in the THROW's @message parameter and considering the plain text and using the %s %d... stuff directly in the string?
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.