@Param NVARCHAR(20) = Hello
PRINT @Param +
Although, we assign the string “Hello” without using quotes, this code will create the stored procedure. If we call this stored procedure using the default value for the parameter, it passes the string “Hello” to the parameter @Param, like follow picture:
uspStringWithoutQuotes @Param =
Although, I reported this problem as a bug in this link , the SQL Server Development Team expressed that while they agree that this behavior is not optimal, it has been in the product for a long time and therefore, they cannot easily change it, as it would break existing applications. Thanks to their fast response, we must avoid using this pattern in our codes until it will be fixed.