【发布时间】:2018-11-20 16:19:51
【问题描述】:
select t.*
into #temp
from
(
select 'a' as a
union all
select 'b' as a
) as t
select * from #temp
drop table #temp
我通常在创建临时表的 SQL Server 上执行此操作。 语法“into #temp”在数据库上创建一个非物理表,而“into temp”将在数据库上创建一个物理表。
我在 MySQL 中的问题是转换上面的 MSSQL 语句。我想要创建的是一个不在数据库上物理创建的临时表。我们在 MySQL 中有这个功能吗?
【问题讨论】:
标签: mysql sql-server insert temp-tables