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