I am trying to make mysql stored function for deleting user with userID parameter, but when i call procedure it deletes all of my data.

CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_user`(IN userID INT)

BEGIN

DELETE FROM users
WHERE userID=userID;

END

I want to make it to delete only one with right ID.

0 Answers