MCITP

MCITP

Thursday, March 10, 2011

Parameter to query

DECLARE @g int
DECLARE @g1 nvarchar(4000)
SET @g1 = 'SELECT @g=10'
EXEC SP_EXECUTESQL @g1 ,N'@g int out',@g out
PRINT @g

No comments:

Post a Comment