Hit this sql Sentence

最近给网站改版,好多数据表要变动,它变了,视图也要变,常用如下语句,可从来就没记住,、
每次都是粘来粘取的,呵呵,够懒的哦。

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ShopsView]')
and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[ShopsView]
GO

Remember this Sentence 

你可能感兴趣的:(this)