Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions