全球新闻专业大学排名:一个SQL方面的问题

来源:百度文库 编辑:神马品牌网 时间:2024/05/15 02:04:39
谁能告诉我这段代码的含义?(详细点)
IF EXISTS (SELECT 1 FROM sysobjects WHERE name = 'WOAttachView' and Type = 'V')
DROP View WOAttachView
GO
CREATE VIEW WOAttachView
AS
SELECT WOAttach.*, Attachment.name AS name
FROM WOAttach INNER JOIN
Attachment ON WOAttach.AttachmentID =
Attachment.AttachmentID
GO
这段代码怎么执行呢?

如果存在视图WOAttachView则删除
然后再创建一个这样的视图