Lori Brown covers a few string functions added to SQL Server in the past two versions:
STRING_ESCAPE (https://docs.microsoft.com/en-us/sql/t-sql/functions/string-escape-transact-sql)
This function is available starting with SQL 2016 and is currently only able to escape JSON characters. To me it’s not super useful just yet but hopefully they will add more types soon.
|
|
I haven’t had the need to use STRING_ESCAPE
yet, but one additional function I’d add is CONCAT_WS
.