当前位置: 移动技术网 > IT编程>数据库>MSSQL > SQL创建临时表

SQL创建临时表

2018年12月11日  | 移动技术网IT编程  | 我要评论

苏徐网,qqlogin,战地尖刀电视剧全集

创建临时表

方法一:

create table #临时表名(字段1 约束条件,

字段2 约束条件,

…..)

create table ##临时表名(字段1 约束条件,

字段2 约束条件,

…..)

方法二:

select * into #临时表名 from 你的表;

select * into ##临时表名 from 你的表;

注:以上的#代表局部临时表,##代表全局临时表

查询临时表

select * from #临时表名;

select * from ##临时表名;

删除临时表

drop table #临时表名;

drop table ##临时表名;

sql server临时表的使用

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网