我创建了一个存储过程,它是输出参数。存储过程:执行输出参数时未显示列名
create proc sp_withoutputparameter
@Gender nvarchar(50),
@employeecount int output
as
begin
select @employeecount=count(id) from temployee where [email protected]
end
declare @Totalcount int
execute sp_withoutputparameter @[email protected] out,@Gender='Female'
print @Totalcount
execute sp_withoutputparameter @[email protected] out,@Gender='Female'
select @Totalcount
Screen shot 1 执行上述查询之后。我得到的结果如附件所示Screen shot 2 在两个查询中,我都使用了print和select两个结果,但我没有得到列名。
请帮我解决这个问题,我应该怎么做一个查询中的修改出现列名?
这将有助于如果我们能看到实际的过程 – twoleggedhorse
http://sqlperformance.com/2012/10/t-sql-queries/sp_prefix –