update ms_cf01 set yfsb=1 from ms_cf01 where yfsb=3;

对一个表数据进行更新操作可以把from [表名]省略.

用from 时一般是从别的关联表中取数据更新时用


update [表1] set [列名]=b.[列名]
FROM [表1] a,[表2] b
where a.[关联列]=b.[关联列]
posted on 2015-12-15 13:47  zishen  阅读(211)  评论(0编辑  收藏  举报