SQL Server 两种判断表名是否存在且删除的方式

  邓老师(老邓)教的

if exists(select * from sysobjects where name='Table_88')
    drop table Table_88

 偷的((*^__^*) 嘻嘻……)

    if exists (select * from sys.objects 
    where object_id = object_id(N'Table_1') 
              and type in (N'U')) 
    drop table Table_1
posted @ 2013-08-07 18:06  罗马景行  阅读(294)  评论(0)    收藏  举报