SQL 过程 返回NULL 不解
createPROCEDURE PK_FDD1(@BBRQ datetime)
AS
begin
select cast(@BBRQ as datetime)
print @@error
return 1
end
调用
declare @DCREP INT
exec PK_FDDRXSZL01 '2012-01-23'
select @DCREP
显示 2012-01-23 00:00:00.000
null
为什么不显示1
------解决方案--------------------
SQL code
--try
declare @DCREP INT
exec @DCREP =PK_FDDRXSZL01 '2012-01-23'
select @DCREP