0% found this document useful (0 votes)
13 views1 page

SQL Server Procedure with Parameters

The document outlines the creation of a stored procedure named 'abProc12' that retrieves a customer's name and address based on their ID. It also describes the need for additional procedures that take two input parameters to perform addition and find a product, returning one output parameter each. Furthermore, it mentions a procedure that will call the previous two procedures and return two output parameters.

Uploaded by

trippics4848
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

SQL Server Procedure with Parameters

The document outlines the creation of a stored procedure named 'abProc12' that retrieves a customer's name and address based on their ID. It also describes the need for additional procedures that take two input parameters to perform addition and find a product, returning one output parameter each. Furthermore, it mentions a procedure that will call the previous two procedures and return two output parameters.

Uploaded by

trippics4848
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

delimiter $$

use ctsdata1 $$
create Procedure abProc12(in custId varchar(4),out cName varchar(50),out cAddress
varchar(100))
begin
set cName = (select customerName from Customers where customerId=custId);
set cAddress = (select customerAddress from Customers where customerId = custId);
select custId as 'The Details For Customer Id';

end $$

create a Procedure to take 2 input parameters to add & give 1 output parameter
create a Procedure to take 2 input parameters to find product and give 1 output
parameter

create another procedure to take 2 input parameters and give 2 output parameters by
calling the above 2 procedures
------

You might also like