select
'update ', sysobjects.name,' set ' , syscolumns.name ,'=replace( ' ,
syscolumns.name ,','''','''' ); '
from syscolumns , sysobjects
where
syscolumns.id = sysobjects.id --记录用户表的名和字段的两个系统表
and
sysobjects.type='U' --表示是用户表
|
生成语句形如:
update aggonggao set content =replace( content ,'','' );
update aggonggao set datetime =replace( datetime ,'','' );
update aggonggao set name =replace( name ,'','' );
阅读(1542) | 评论(0) | 转发(0) |