sqlserver临时表的删除方法
来源:互联网 发布:新疆人口普查数据 编辑:程序博客网 时间:2024/05/23 21:29
ifobject_id('tempdb..#temp')is not null Begin
drop table #temp
End
一个#号的临时表是事务级别的,就是说一个临时表只存在于一个事务里面。一个查询中的代码就是一个事务里面的(不包括拼接的sql语句)
CREATETABLE #temp
(
name VARCHAR(80)
);
INSERTINTO #temp
VALUES ('五道口店');
INSERTINTO #temp
VALUES ('五羊邨店');
INSERTINTO #temp
VALUES ('杨家屯店');
INSERTINTO #temp
VALUES ('十里堤店');
INSERTINTO #temp
VALUES ('中关村店');
INSERTINTO #temp
VALUES ('丽秀店');
INSERTINTO #temp
VALUES ('石门店');
INSERTINTO #temp
VALUES ('黄村店');
INSERTINTO #temp
VALUES ('东圃店');
INSERTINTO #temp
VALUES ('天河店');
INSERTINTO #temp
VALUES ('人民路广场');
INSERTINTO #temp
VALUES ('社区中心');
INSERTINTO #temp
VALUES ('珠海市');
INSERTINTO #temp
VALUES ('丽都');
INSERTINTO #temp
VALUES ('晓月');
INSERTINTO #temp
VALUES ('旧区');
INSERTINTO #temp
VALUES ('新城');
INSERTINTO #temp
VALUES ('水井沟');
select* from #temp
ifobject_id('tempdb..#temp')is not null Begin
drop table #temp
End
从一大堆有包含中文字符和编号的字符串中过滤出编号。selectRIGHT(name,4)from #temp
- sqlserver临时表的删除方法
- 删除SQLSERVER中的临时表
- SQLServer的临时表
- SQLServer if判断与删除临时表
- sqlserver临时表的使用
- 临时表的删除
- 删除临时表空间方法
- SQLServer中临时表的一则使用
- Oracle和SQLServer的“临时表”应用
- Sqlserver 临时表的特性与使用
- SQLSERVER与MYSQL临时表的使用
- 【SQLServer】临时表的一些应用
- SqlServer 临时表
- sqlserver 临时表使用方法
- sqlserver 临时表
- SQLServer]临时表
- sqlserver创建临时表
- sqlserver 创建临时表
- Executors VS ThreadPoolExecutor
- 关于Select方法的使用
- atom下载,atom下载受限问题,atom国内资源,atom下载失败
- 使用AES+自己算法设计加密解密算法
- Java 各种读取文件方法以及文件合并
- sqlserver临时表的删除方法
- UITableView侧滑添加多个按钮
- Ubuntu16.04LTS 安装 QT
- Android-软引用(SoftRefrerence)和弱引用(WeakReference)
- 文件内容读取管理
- 局域网ORACLE 无监听端口 无法连接到数据库
- ngx_lua 模块开发 入门
- js日期格式互转
- J.U.C--乐观锁与悲观锁以及乐观锁的一种实现方式-CAS