视图是一个虚拟的表,该表中的数据是由一个查询语句执行后所得到的查询结果所构成的。
创建视图:
CREATE VIEW VIEW_Name
AS
SQL 语句
例子:
create view pr_例四asselect 产品.产品ID,产品.产品名称,产品.供应商,类别.类别名称,类别.说明from 产品 inner join类别 on 产品.类别ID=类别.类别ID
查看视图:
select * from pr_例四
结果