赛捷软件论坛's Archiver

vicky.yu 发表于 2019-3-14 10:19

SQL 更新视图

您可以使用下面的语法来更新视图:

SQL CREATE OR REPLACE VIEW Syntax
CREATE OR REPLACE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
现在,我们希望向 "Current Product List" 视图添加 "Category" 列。我们将通过下列 SQL 更新视图:

CREATE VIEW [Current Product List] AS
SELECT ProductID,ProductName,Category
FROM Products
WHERE Discontinued=No

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.