return另外一个用法

ALTER PROCEDURE p_test
@name VARCHAR(11)
AS
IF (@name = NULL)
RETURN 1
ELSE
RETURN 2


DECLARE @return INT;
EXEC @return = p_test '2';
SELECT 'Return ' = @return;

posted @ 2011-07-30 22:49  qanholas  阅读(179)  评论(0编辑  收藏  举报