SDU Tools: ExecuteOrPrint - Printing large strings in T-SQL
The PRINT statement in SQL Server’s T-SQL language is useful but one of the biggest restrictions with it is the size of the strings that it can print. Where this becomes a big issue is if you are needing to create dynamic SQL statements (which you obviously need to be careful of in the first place) or scripting database objects, and the statements need to be either executed or printed.
2018-08-08