Last updated 1 year ago
Escapes special characters in texts and returns text with escaped characters. ().
STRING_ESCAPE( text, type )
text: Text to escape characters.
text
type: Format type to escape characters. Currently, JSON is the only format supported.
type
VARCHAR.
VARCHAR
SELECT STRING_ESCAPE('\ / \\ " ', 'json') AS [ESCAPE];
ESCAPE| --------------------------+ \\ \/ \\\\ \" |