CREATE PROCEDURE `test_temp_tb`( ) BEGIN CREATE TEMPORARY TABLE IF NOT EXISTS temp_tb AS ( SELECT * FROM TB_TEST ); select *from temp_tb END call test_temp_tb()