hi every one,

i am trying to store store procedure result into temporary table

tried using

DELIMITER $$
DROP procedure IF EXISTS `Merge` $$
CREATE procedure `Merge`()
begin

create temporary table table1
call sp1();

create temporary table table2
call sp2();

End $$

DELIMITER ;


error ::

Script line: 3 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call sp1();

create temporary table table2
call sp2();

End' at line 5

The table defintion and the semicolon is missing after table1 and table2.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.