exec sp_executesql N'select @value=姓名 from people where 人员编号=''0001''',N'@value varchar output',@name outputselect @name

sql中返回参数的值