视图

创建视图

创建视图语法:create VIEW 视图名 AS 查询语句;

CREATE VIEW view_all

AS SELECT e.empNAme,e.salary,e.phone,d.deptName

FROM dept d INNER JOIN emp e ON d.`id`=e.`deptID`;

删除视图

语法:drop view 视图名

https://www.cnblogs.com/duhuo/p/4646808.html

你可能感兴趣的:(视图)