Can a MYSQL function return a temporary table that was created inside the same function ?
Like this :
DELIMITER $$
CREATE FUNCTION `getPolicy`(CID SMALLINT, TID SMALLINT)returns
tt_Rtab TABLE (a INT, i BIT, value VARCHAR(8000))
BEGIN
declare V varchar(30);
CREATE TEMPORARY TABLE IF NOT EXISTS tt_RetTab
(
attribute INT,
inherit BIT,
`value` VARCHAR(8000)
);
DROP TEMPORARY TABLE IF EXISTS tt_Parents;
END $$
DELIMITER ;
-----------------------------------------------
This can be done in SQL Server DB.
How to do the same in MYSQL?