Use a stored procedure parameter for unit parameter of DATE_SUB
- by Mike
I would like to know if it's possible to pass a parameter to a mysql stored procedure and use this parameter as the unit parameter of the DATE_SUB function. It seems that the unit parameter is a reserved word so I don't know if there's a type for unit.
Exemple of what I'm trying to do :
DELIMITER $$
DROP PROCEDURE IF EXISTS `test` $$
CREATE…