Is MySQL Temporary table a shared resource?

后端 未结 2 1422
Happy的楠姐
Happy的楠姐 2020-12-28 13:59

I have a MySQL stored procedure that uses a temporary table. Assume that my table name is \'temp\' and I use it to store some middle data. It will create at the beginning of

2条回答
  •  暖寄归人
    2020-12-28 14:33

    No, a temp table is limited to the scope of your database connection. You can use the temp table in subsequent calls to the procedure during the same database connection, but other connections cannot access it. They can create a table by the same name, but each temp table will be independent. Temp tables go away when you close your connection.

提交回复
热议问题