日期:2014-05-19  浏览次数:20616 次

查询到的 @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)