mysql - return table 来自另一个存储过程中的存储过程

mysql - return table from a stored proc in another stored proc

我有 storedproc1,我想在其中调用 usp_splitDelimitedStr。 usp_splitDelimitedStr 创建一个临时文件 table 并从中选择 我想使用从 usp_splitDelimitedStr 编辑的值 return 将它们插入到在 storedproc1 中创建的临时 table 中的列中。 所以它看起来像这样,

CREATE PROCEDURE storedproc1
 (
CREATE TEMPORARY TABLE tmpAdditionalInfo 
    (FieldKeys VARCHAR(255), FieldValues VARCHAR(255));

.....

-- here I insert into the column using the 
INSERT INTO tmpAdditionalInfo(FieldKeys) VALUES (CALL usp_splitDelimitedStr(In_OrderFieldKeys,'|'));

)

注意:背景是我正在使用 usp_splitDelimitedStr 拆分定界字符串和 return 拆分字符串(给调用者,即 storedproc1),方法是从临时 [=27] 中选择它们=] 它已经创建,我不能使用函数,因为它不可能在 mysql.

中的函数中 return table

如有任何建议,我们将不胜感激

调用该过程,然后从它在 INSERT 语句中创建的临时 table SELECT

CALL usp_splitDelimitedStr(In_OrderFieldKeys, '|');

INSERT INTO tmpAdditionalInfo (FieldKeys)
SELECT FieldKeys
FROM tableCreatedBy_usp_splitDelimitedStr;