日期:2014-05-17 浏览次数:20545 次
DECLARE @DBInstance NVARCHAR(100)
DECLARE @SQL NVARCHAR(500)
DECLARE @i NVARCHAR(500)
DECLARE @Fid NVARCHAR(500)
DECLARE @j nvarchar(10)
SET @Fid='1'
SET @i='10'
set @j='1'
SET @DBInstance='t_temp'
SET @SQL=@DBInstance+' '+@i +',@Fid OUTPUT'
EXEC (@SQL)
SET @SQL=@DBInstance+' '+@i +',@Fid OUTPUT'
EXEC sp_executesql @SQL,N'@Fid NVARCHAR(500) OUTPUT',@Fid OUTPUT
select @Fid