In my university notes I am currently attempting to study views but nowhere in the material is the criteria that shows when a simple view can be updated, inserted or deleted. I assume privileges can have a lot to do with this and seems like common sense to not allow data in a view to be deleted by anyone other than the person who created the view but this isn't about common sense just is it possible to update, insert or delete a view and what is the criteria of that.
for my example I have created a view called EmployeeName
s which takes the first_name
, last_name
under a new field Name
s like so
CREATE VIEW EmployeeName as
SELECT first_name + last_name "Names"
FROM Employees;
(not altogether sure of this syntax either but i think its right)
can this field be updated, inserted or deleted by anyone who has access to this view?(without privileges)
There are certain conditions must be met, so that view could be updatable. If you have, for example, an aggregate functions in view, you obviously cannot update it.
For Oracle more information you could find here
For MySQL it's pretty similar to oracle