当前位置: 代码迷 >> Sql Server >> sql output,该怎么解决
  详细解决方案

sql output,该怎么解决

热度:382   发布时间:2016-04-27 19:30:17.0
sql output
use message
declare @cmd as nvarchar(200)
declare @name as nvarchar(200)
declare @exchange as nvarchar(200)
set @cmd='select username from systemuser where useraccounts=''ABC'''
select @cmd as [email protected]'
exec sp_executesql @cmd,[email protected] nvarchar(200) output',@exchange output
select @exchange as 'Condition'



------解决方案--------------------
SQL code
declare @cmd  nvarchar(8000) declare @exchange  nvarchar(200) set @cmd= 'select @username=username from systemuser where useraccounts= ''ABC ''' exec sp_executesql @cmd,N [email protected] nvarchar(200) output ',@exchange output
  相关解决方案