I want to know how to define or declare Internal table in MySQL
I am new to MySQL and i Don't know the syntax
as you can see I create Stored Procedure
CREATE DEFINER=`root`@`localhost` PROCEDURE `MySP`(
actioncode VARCHAR(5),
TNewsID BIGINT
)
BEGIN
IF actioncode = 1 then -- Retrive all from the database --
select *
from emp.tbnews;
elseIF actioncode = 2 then -- Retrive all from the database By NewsID --
select NewsID,NewsSubject,NewsSubjectAR,NewsDetails,NewsDetailsAR,CreatedOn,DisplayOrder,
AllowDisplay,img
from emp.tbnews
Where NewsID=TNewsID;
elseIF actioncode = 3 then -- fkjskldfjklsdf --
select NewsID,NewsSubject,NewsSubjectAR,NewsDetails,NewsDetailsAR,CreatedOn,DisplayOrder,
AllowDisplay,img
from emp.tbnews;
END IF;
END
What I Really want is to declare Internal table before the IF Statement
in Sql Server I am doing it like this
declare @tbTemp table (
a as int,
b as char...etc.
)
because i want to put insert statement after
IF actioncode = 1
Insert into @tbTemp
so please if you know tell me how
best regards for every one.