SQL创建临时表
2017-09-19 08:17
302 查看
创建临时表
方法一:
create table #临时表名(字段1 约束条件,
字段2 约束条件,
…..)
create table ##临时表名(字段1 约束条件,
字段2 约束条件,
…..)
方法二:
select * into #临时表名 from 你的表;
select * into ##临时表名 from 你的表;
注:以上的#代表局部临时表,##代表全局临时表
查询临时表
select * from #临时表名;
select * from ##临时表名;
删除临时表
drop table #临时表名;
drop table ##临时表名;
SQL SERVER临时表的使用
http://www.cnblogs.com/shineqiujuan/archive/2008/11/13/1332657.html
方法一:
create table #临时表名(字段1 约束条件,
字段2 约束条件,
…..)
create table ##临时表名(字段1 约束条件,
字段2 约束条件,
…..)
方法二:
select * into #临时表名 from 你的表;
select * into ##临时表名 from 你的表;
注:以上的#代表局部临时表,##代表全局临时表
查询临时表
select * from #临时表名;
select * from ##临时表名;
删除临时表
drop table #临时表名;
drop table ##临时表名;
SQL SERVER临时表的使用
http://www.cnblogs.com/shineqiujuan/archive/2008/11/13/1332657.html
相关文章推荐
- SQL临时表的创建+查询
- 不创建表结构,直接放入临时表结果(包括存储过程,直接sql语句)
- Sql 怎么创建临时表
- SQL创建临时表
- 一条sql语句引发mysql不停创建临时表的问题解决..coping to tmp table on desk
- SQL 动态创建临时表
- sql server中如何创建,使用,释放临时表
- SQL 综合应用(1.创建临时表,为后续查询所用) 实例_(学生,课程表,选修表)
- 创建临时表,一条sql语句一次插入多条记录
- sql创建临时表或视图增加 自增列
- sql创建临时表或视图增加 自增列
- MS SQL 中判断 数据库, 存储过程,表,临时表,视图,函数,用户,用户创建对象 等是否存在 SQL脚本
- SQL创建临时表
- sql 创建临时表
- 使用2000创建临时Job异步执行SQL脚本
- sql 创建临时表的两种写法和删除临时表
- SQL 创建临时表
- SQL创建临时表
- sql中用临时表 或 创建视图那个效率比较快!
- sql 创建临时表 并且插入多条数据