USE Database GO IF OBJECT_ID(‘ViewName‘)IS NOT NULL BEGIN DROP VIEW ViewName END GO
SQL脚本删除表信息
USE Database GO IF EXISTS (SELECT * FROM dbo.sysobjects WHERE ID = OBJECT_ID(N‘dbo.TableName‘) AND OBJECTPROPERTY (id,N‘IsUserTable‘) = 1 ) BEGIN TRUNCATE TABLE TableName DROP TABLE TableName END GO