ALTER proc proc_indicator_desc_GetTableStruct
@catalog_code varchar(10),
@item_code smallint
@indicator_name varchar(80) output --指标名作为输出,以便在界面上优先排列
as
set nocount on;
select @indicator_name=display_name from indicator_desc 
where catalog_code=@catalog_code and item_code=@item_code
select field_name,display_name,value_type as 'type',type_len as 'length'
from indicator_desc where catalog_code=@catalog_code and 
item_code=@item_code
union
select field_name,display_name,value_type as 'type',type_len as 'length'
from dim_desc,indicator_dim where catalog_code=@catalog_code and 
item_code=@item_code and indicator_dim.dim_code=dim_desc.code调用时只取得记录集,没有取得indicator_name输出参数的值,调用时已经指明了参数方向。