SQL server 2000 如何判断临时表是否存在
来源:互联网 发布:windows的活动目录 编辑:程序博客网 时间:2024/04/28 16:33
1.判断一个临时表是否存在
if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tempcitys') and type='U')
drop table #tempcitys
注意tempdb后面是两个. 不是一个的
---临时表
if exists(select * from tempdb..sysobjects where name like ‘#tmp1%‘)
drop table #tmp1
或
if exists( select * from tempdb..sysobjects where id=OBJECT_ID('tempdb..#tmp') )
drop table #tmp1
--视图
if exists (select * from sysobjects where id = object_id(N‘[dbo].[ESTMP]‘)
and OBJECTPROPERTY(id, N‘IsView‘) = 1)
drop view ESTMP
判断表是否存在
if exists (select * from sysobjects where id = object_id(N'[dbo].[phone]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[phone]
- SQL server 2000 如何判断临时表是否存在
- SQL server 2000 如何判断临时表是否存在 .
- sql server判断临时表是否存在
- SQL Server判断临时表是否存在
- 判断SQL Server临时表是否存在
- SQL判断临时表是否存在
- sql判断临时表是否存在
- SQL判断临时表是否存在
- [转]SQL判断临时表是否存在
- sql 判断临时表的是否存在
- sql 判断临时表的是否存在
- sql server检查临时表是否存在
- sql server检查临时表是否存在
- 如何判断临时表是否存在
- sql server如何判断数据库是否存在
- MS SQL SERVER 2008 使用OBJECT_ID判断临时表是否存在
- 判断临时表是否存在
- 判断临时表是否存在
- Qt窗口屏幕居中显示
- 常用关键字
- .net实现图片保存到数据库和从数据库中读取图片-z
- 简单理解抽象工厂模式
- 中国程序员的悲哀
- SQL server 2000 如何判断临时表是否存在
- Windows Presentation Foundation (WPF) 3D 教程(一)---声明
- C++ Primer是采用这样的技术让模板定义和实现分离 || vc2005 “NULL”: 未声明的标识符 vc2005
- Linux开发环境必备十大开发工具
- 团队之美
- Java实现MD5加密以及解密类,附带测试类,具体见代码。
- 初来乍到!
- openlayers 学习笔记(四)
- CSS布局口诀 - CSS BUG查找顺口溜