Question: Task 5: Create the GET_CREDIT_LIMIT procedure to obtain the full name and credit limit of the customer whose ID currently is stored in I_CUST_ID. Place

Task 5: Create the GET_CREDIT_LIMIT procedure to obtain the full name and credit limit of the customer whose ID currently is stored in I_CUST_ID. Place these values in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. When the procedure is called it should output the contents of I_CUSTOMER_NAME and I_CREDIT_LIMIT.

this is the code i used:

CREATE PROCEDURE GET_CREDIT_LIMIT

(

IN I_CUST_ID int,

OUT I_CUSTOMER_NAME varchar(75),

OUT I_CREDIT_LIMIT decimal(10,2)

)

BEGIN

SELECT CONCAT(FIRST_NAME, ' ', LAST_NAME) INTO I_CUSTOMER_NAME,CREDIT_LIMIT INTO I_CREDIT_LIMIT

FROM CUSTOMER

WHERE CUST_ID = I_CUST_ID;

getting this error:

ERROR 1327 (42000) at line 1: Undeclared variable: CREDIT_LIMIT

please help me. ty

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!