替换SQL Server字段中的换行符,回车符

replace(string_expression , string_pattern , string_replacement)

第一个参数:要查找的字段。

第二个参数:要查找的字符。

第三个参数:要替换成的字符。

char(9) 水平制表符 char(10)换行键 char(13)回车键

SELECT REPLACE(detail, CHAR(13) + CHAR(10), '<br>') AS detail FROM Test

原文地址:https://www.cnblogs.com/101key/p/3284234.html