SQL -Structured Query Language - SQL View - Update View Tutorial
SQL View is an imaginary view table based on information retrieved using a select query.
Suppose a user wants to update the already created view
The syntax for view update is-
ALTER VIEW view_name AS
[select query];
An example for view update is-
ALTER VIEW usersalary_view AS
SELECT e.first_name,e.last_name,jh.start_date
FROM employees as e
INNER JOIN
job_history as jh
WHERE e.employee_id = jh.employee_id;
Here it will update an already existing view.
Syntax to see the view-
SELECT * FROM view_name;
An example to see the view-
SELECT * FROM usersalary_view;