About Me

Barking, Essex, United Kingdom
MCITP DBA ,MCITP BI & Oracle OCP 11G

Saturday, January 25, 2014

Store Procedures with output parameter

use AdventureWorks
 
Create Proc test 
( 
@EmployeeID int, 
@ManagerID int output 
) 
as begin 

select @ManagerID=ManagerID from HumanResources.Employee 
where EmployeeID=@EmployeeID 
End 

Declare @output int
Exec test 2,@managerID=@output output
print @output

 


No comments:

Post a Comment