SQL Server创建临时表:
创建临时表
方法一:
create table #临时表名(字段1 约束条件,字段2 约束条件,...)
create table ##临时表名(字段1 约束条件,字段2 约束条件,...)
方法二:
select * into #临时表名 from 你的表;
select * into ##临时表名 from 你的表;
注:以上的#代表局部临时表,##代表全局临时表

查询临时表
select * from #临时表名;
select * from ##临时表名;

删除临时表
drop table #临时表名;
drop table ##临时表名;


Mysql创建临时表
创建临时表
create temporary table 临时表名(字段1 约束条件,字段2 约束条件,...)

查询临时表
select * from 临时表名

删除临时表
drop table 临时表名

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-05-22
  • 2022-12-23
  • 2021-06-19
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
相关资源
相似解决方案