更新数据库字段其中一部分的语法
DECLARE @oldPath varchar(480)
select @oldPath = path from CMS_Categories where CategoryID = @CategoryID
UPDATE CMS_Categories SET Path = STUFF(Path, 1, LEN(@oldPath), @path) where path like @oldPath + '%'
STUFF()函数的用法是将指定字符串(path)从某索引值开始到某索引值这段字符中替换成指定字符串
select @oldPath = path from CMS_Categories where CategoryID = @CategoryID
UPDATE CMS_Categories SET Path = STUFF(Path, 1, LEN(@oldPath), @path) where path like @oldPath + '%'
STUFF()函数的用法是将指定字符串(path)从某索引值开始到某索引值这段字符中替换成指定字符串