Hello,
I have the following stored procedure:
But I get the following error message on the where clause. The staffID is an input.
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE StaffID = _StaffID;
Many thanks for any assistance.
Steve
I have the following stored procedure:
But I get the following error message on the where clause. The staffID is an input.
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE StaffID = _StaffID;
Many thanks for any assistance.
Steve
Code:
CREATE PROCEDURE `erestaurant`.`GetOrdersSelByStaffID`(IN _StaffID INTEGER)
/*LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'*/
BEGIN
SELECT * FROM Orders;
WHERE StaffID = _StaffID;
END$$
DELIMITER ;