--View
--encapsulates a complex query statement that is the view.
--Advantages: Simplifying query statements
--eg
CREATE VIEW Emp_view
As
Select Ename as name, job as work, Sal as salary,
Dname as department from EMP INNER join DEPT
On EMP. Deptno=dept. DEPTNO
WHERE sal>2500
SELECT * from Emp_view
WHERE Salary >2000
-----------------------------------------------
-What exactly is in the view??
--. result set
--. SELECT statement
--All the data is from the original table, and there is no data in the view.
--If you modify (edit) The data in the view, it boils down to changing the data in the original table.
--Conclusion: only data that can be traced back to the original table can be modified in the view, and most views cannot be modified. The functionality of the view (if you want to modify the best operation for the original table) is mainly reflected in the query
015. Views (SQL Instance)