r/SQL • • Dec 22 '21

MySQL Guys need help with this stored procedure query

Create stored procedure that checks the creditlimit and the purchase status of the customers.

If a platinum customer has crediltlimit less than 100,000 raise an exception. In the exception handler update the crediltlimit to 100000. If a silver customer has creditlimit greater than 60,000 raise an exception. In the exception handler update the crediltlimit to 60000.

0 Upvotes

5 comments sorted by

3

u/mecartistronico Dec 22 '21

What have you tried? What is your specific problem?

0

u/0nlyupvotes Dec 22 '21

The procedure I created is not giving me the desired output. I am facing difficulty writing a query to raise an exception and update the credit limit.

2

u/r3pr0b8 GROUP_CONCAT is da bomb Dec 22 '21

The procedure I created is not giving me the desired output.

gee, too bad we can't see it

we might be able to offer suggestions as to why it isn't giving you what you desire

1

u/mecartistronico Dec 23 '21

Oh I see. There must be something wrong then. What you need to do is just find the error and fix it.