如何在存储过程或触发器中获取结果?
这是我的代码:
DROP TRIGGER IF EXISTS `log_activity`;
DELIMITER ;;
CREATE TRIGGER `log_activity` AFTER INSERT ON tbl_1
FOR EACH ROW
BEGIN
SET @RESULT = (SELECT id,name FROM tbl2);
END ;;
我想要我的代码:
当@结果开始时
//i want to get the value of the id and name
结尾;