Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
从一个字符串中删除多个字符,并用另一个字符串替换它们。
STUFF( string-expression-1, start, length, string-expression-2 )
string-expression-1 要用 STUFF 函数修改的字符串。
start 开始删除字符的字符位置。字符串中第一个字符的位置是 1。
length 要删除的字符数。
string-expression-2 要插入的字符串。要使用 STUFF 函数删除字符串的一部分,请使用 NULL 作为替换字符串。
VARCHAR
SQL/2008 服务商扩充。
以下语句返回值 chocolate pie。
SELECT STUFF( 'chocolate cake', 11, 4, 'pie' );