SQL Views   «Prev 

Updating a Table with a view

With some engines, you can even protect the SELECT statement associated with your view. This lets you set up the view, but at the same time make sure that people cannot use your view to figure out the underlying tables. If you are working with confidential information, you will want to look into encrypting your views to protect them.
Views can be updated only if all elements of the view are a subset of the base table.
Suppose there exists a base table
 empid name and addr columns

then a view on this table is created as
create view myview as 
select * from emp;

only these type of views are updatable.
create view myview as select name addr from emp; 

is not updatable.