2013年4月17日

SQL Server 如果视图存在执行删除

摘要: IF EXISTS(Select Name From Sysobjects Where Name='P_ExistsDropView' And Xtype='P')DROP PROC P_ExistsDropViewGOCreate Proc P_ExistsDropView(@DelView Varchar(200))AsDeclare @SQLText Varchar(1000)If Exists(Select Top 1 Name From Sysobjects Where Name=@DelView And XType='V') Begi 阅读全文

posted @ 2013-04-17 14:48 哈哈哈哈BBA 阅读(4014) 评论(0) 推荐(0) 编辑

SQL Server 如果表存在执行删除

摘要: IF EXISTS(Select Name From Sysobjects Where Name='P_ExistsDropTable' And Xtype='P')DROP PROC P_ExistsDropTableGOCreate Proc P_ExistsDropTable(@DelTable Varchar(200))AsDeclare @SQLText Varchar(1000)If Exists(Select Top 1 Name From Sysobjects Where Name=@DelTable And XType='U') 阅读全文

posted @ 2013-04-17 14:45 哈哈哈哈BBA 阅读(10781) 评论(0) 推荐(0) 编辑

导航