我有一个如下的存储过程。
在这里,我创建了一个名为tempDesTable的临时表并从数据库中放入数据。现在我必须从另一个选择查询中放入额外的数据。但它显示Error Code : 1327 Undeclared variable: tempDesTable
BEGIN
CREATE TEMPORARY TABLE tempDesTable AS (SELECT ID, FirstName, LastName FROM t_users WHERE `DesignationID` = p_DesignationID AND BranchID = 0);
SELECT ID, FirstName, LastName INTO `tempDesTable` FROM t_users WHERE `DesignationID` = p_DesignationID AND BranchID = p_BranchID;
END$$