首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

查询到的 @F1 是条Insert语句,如何样才能使用!

2012-01-08 
查询到的 @F1 是条Insert语句,怎么样才能使用!!!createprocspInsertTableSQLasDECLARExCursorCURSORFORsel

查询到的 @F1 是条Insert语句,怎么样才能使用!!!
create     proc   spInsertTableSQL
as
DECLARE   xCursor   CURSOR   FOR
select   String   from   testdb
declare   @F1   varchar(4000)
OPEN   xCursor
FETCH   xCursor   into   @F1
WHILE   @@FETCH_STATUS   =   0
BEGIN
execute   @F1
        FETCH   NEXT   FROM   xCursor   into   @F1
END
CLOSE   xCursor
DEALLOCATE   xCursor
go

查询到的 @F1 是条Insert语句,怎么样才能使用!!!

[解决办法]
exec(@F1)

热点排行
Bad Request.