📜  Mysql 表变量 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:24.313000             🧑  作者: Mango

代码示例1
CREATE PROCEDURE my_proc () 
BEGIN

CREATE TEMPORARY TABLE TempTable (myid int, myfield varchar(100)); 
INSERT INTO TempTable SELECT tblid, tblfield FROM Table1; 
...
-- Temporary tables in MySQL only exist for the duration of the connection 
-- and only for the connected user, unlike MSSQL where they persist across 
-- sessions and connections.