How to create a temporary table within a stored procedure

Asked

Viewed 153 times

0

greetings! My question is the following: I would like to know how to create a temporary table within a procedure, in which the values of my temporary table will be taken from a permanent table in my database. From the permanent table I will only need to use two columns to validate my procedure. And after the execution of the procedure exclude this temporary table.

  • "how do I create a temporary table within a procedure" using the command CREATE TEMPORARY TABLE, as if it were a common table

  • But as I call into the columns that will be in the temporary table the data of the other two columns of the permanent table?

  • your question is confused, the problem is create table or insert data? to insert use INSERT INTO with select in the other table, or easier SELECT INTO

  • The biggest problem is to insert this data from another table.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.