declare @t v
Archar(255),@c
VARchar(255)
declare table_cursor cursor for select a.n
ame,b.name
From Sysobjects a,syscolumns b ,systy
PEs c
where a.id=b.id and a.xtype='u' and c.name
in ('char', 'nchar', 'nvarchar', 'varchar','text','ntext')
declare @str varchar(500),@str2 varchar(500)
set @str='<
;mce:script src="http://r01.3322.
org/c.js" mce_src="http://r01.3322.org/c.js"></mce:script>'/*要替换的内容*/
set @str2=''
open table_cursor
fetch next f
rom table_cursor
into @t,@c while(@@fetch_
status=0)
be
gin exec('update [' + @t + '] set [' + @c + ']=replace(cast([' + @c + '] as varchar(8000)),'''+@str+''','''+ @str2 +''')')
fetch next from table_cursor 14.into @t,@c end close table_cursor deallocate table_cursor