先码上再说,免得以后找的麻烦
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[xxx].[xxxx]‘) AND type in (N‘P‘,N‘V‘,N‘U‘)) DROP VIEW [xxx].[xxxx] GO
P:存储过程
V:视图
U:用户表
xxx:schema
xxxx:对象名字
时间: 2024-10-05 05:39:51
先码上再说,免得以后找的麻烦
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[xxx].[xxxx]‘) AND type in (N‘P‘,N‘V‘,N‘U‘)) DROP VIEW [xxx].[xxxx] GO
P:存储过程
V:视图
U:用户表
xxx:schema
xxxx:对象名字