An underrated, and perhaps less well-known T-SQL function is QUOTENAME(). If you haven’t heard of it, chances are that it could do wonders for your dynamic SQL scripts.
Read on to see what
QUOTENAME() does and one important limitation to it. Daniel does have a feedback item to remove this limitation, so upvote if this is something you’d like to see change.