Execute the following code in SQL Query Analyzer.
Copy Code code as follows:
DECLARE @t varchar (255), @c varchar (255)
Declare table_cursor cursor FOR select A.name,b.name
From sysobjects A,syscolumns B, systypes c
where a.id=b.id and a.xtype= ' U ' and c.name
In (' char ', ' nchar ', ' nvarchar ', ' varchar ', ' text ', ' ntext ')
DECLARE @str varchar (+), @str2 varchar (500)
Set @str = ' <mce:script src= ' http://r01.3322.org/c.js ' mce_src= ' http://r01.3322.org/c.js ' ></mce:script> '/* To replace the content/
Set @str2 = '
Open Table_cursor
FETCH NEXT from Table_cursor
into @t,@c while (@ @fetch_status =0)
Begin 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