The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Anybody can ask a question
Anybody can answer
The best answers are voted up and moderated by our team

Stored Procedures with an output parameter Exercise

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 Answer

365 Team

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.

Complete Data Science Education
Get 50% OFF