[Quote=引用 4 楼 sky_7_love 的回复:]
IF len(@CSWSC)=1
SET @STRTEMP=N' And BFYY.BFSYGS >0'
ELSE IF len(@CSWSC)=2
SET @STRTEMP=N''
ELSE IF @CSWSC =3
SET @STRTEMP=N' And BFYY.BFSYGS =0'
select p.name as pname,p.default_value ,t.name as type ,p.max_length from sys.all_parameters p join sys.systypes t
on p.system_type_id=t.xtype and t.status=0
where object_id=object_id('sp_who')