CREATE PROC HumanResources.AddDepartment@N

5 查阅
CREATE PROC HumanResources.AddDepartment @Name nvarchar(50), @GroupName nvarchar(50), @DeptID smallint OUTPUTASIF ((@Name = '') OR (@GroupName = '')) RETURN -1INSERT INTO HumanResources.Department (Name, GroupName)VALUES (@Name, @GroupName)SET @DeptID = SCOPE_IDENTITY()RETURN 0正确执行存储过程的语句是()?

DECLARE @dept int, @result intEXEC @result = AddDepartment 'Refunds', '', @dept OUTPUT

DECLARE @dept int, @result intEXEC @result = AddDepartment 'Refunds', 'Computer', @dept OUTPUT

DECLARE @dept int, @result intEXEC @result = AddDepartment '', '', @dept OUTPUT

DECLARE @dept int, @result intEXEC @result = AddDepartment @dept OUTPUT

参考答案:

ABC

SQL试