Last answered:

08 May 2020

Posted on:

08 May 2020

0

Stored Procedures with an output parameter Exercise

In the Stored Procedures with an output parameter mysql exercise, I was to Create a procedure called ‘emp_info’ that uses as parameters the first and the last name of an individual, and returns their employee number. I received this error "Error Code: 1172. Result consisted of more than one row" when I tested with an employee name in the employees database. When I tried again with other names, the code ran successfully. Please how can stop getting this error for this particular employee. By the way the employee name is " Georgi Facello". Thank you
1 answers ( 0 marked as helpful)
Instructor
Posted on:

08 May 2020

0
Hi Mark! Thanks for reaching out and pointing this out! Quite simply, to not complicate the code and the task, we let the procedure apply to non-duplicate records only (in terms of combination of first and last names). You can add a GROUP BY first_name clause to solve for this problem. Hope this helps.
Best,
Martin

Submit an answer