title: Error: Not allowed to return a result set from a trigger
body: <pre><code>DROP TRIGGER IF EXISTS `examcnpm`.`users_BEFORE_DELETE`;
  
  DELIMITER $$
  USE `examcnpm`$$
  CREATE DEFINER = CURRENT_USER TRIGGER `examcnpm`.`users_BEFORE_DELETE` BEFORE DELETE ON `users` FOR EACH ROW
  BEGIN
      declare id int;
  
      select id= (select userid from deleted);
      delete from Result where Result.userid=id;
  
      delete u from Users as u inner join deleted as r on u.userid=r.userid 
      where u.userid=id;
  END$$
  
  DELIMITER ;
  </code></pre>