0

我有一个表,其中有 10 条记录,现在我想更新特定的列数据,这意味着某些部分是某些列数据,有些不是,例如在第 1 行中,我想用标准更改 std,其他数据将保持不变,更改相同的东西在单个查询中的所有行中。有可能吗?记住我们不能再次删除和添加单元格,因为它会改变 id

id - col1 - col2

1 - A - std abcad
2 - B - std bcddsad
3 - C - std avadsad
4 - A - std abcdsad
5 - B - std bcddsa
6 - C - std avadsad
7 - A - std abcdsd
8 - B - std bcddsds
9 - C - std avadsd
4

2 回答 2

2

您可以为此使用替换功能

Update
    table
Set
    col2 = Replace(col2, 'std', 'standard');
于 2013-10-06T17:14:31.360 回答
0
UPDATE tblName

SET Column .WRITE('Standard',(CHARINDEX('std',Column,1)-1),LEN('std'))
于 2013-10-06T17:39:44.710 回答