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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started