Last answered:

14 Nov 2023

Posted on:

22 May 2023

0

Resolved: Video syntax is outdated/incomplete. Need to run set @@global.sql_mode... & restart application

Video syntax is outdated/incomplete. Need to run  

set @@global.sql_mode := replace(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', '');

then restart application

DELIMITER $$
USE employees $$
DROP PROCEDURE IF EXISTS emp_avg_salary $$
CREATE PROCEDURE emp_avg_salary(IN p_emp_no INTEGER)
BEGIN
    SELECT e.first_name, e.last_name, AVG(s.salary)
    FROM employees e
    JOIN salaries s ON e.emp_no = s.emp_no
    WHERE e.emp_no = p_emp_no;
END$$
DELIMITER ;
2 answers ( 1 marked as helpful)
Posted on:

22 May 2023

0

Posted to make note of this to refer back to it for future and hopefully save anyone else the same frustrations I had.

Posted on:

14 Nov 2023

0

still not working for me !


Submit an answer