You can read and update data by using views. Views that can be updated are called updatable views.
For example, you can execute the following DELETE statement to update the view named staff_dept_10:
DELETE staff_dept_10 WHERE employee_id = 200;
After receiving the request, OceanBase Database processes it in the following steps:
Parse the statement and replace
staff_dept_10with the view definition.Check whether the view to be updated meets the required constraints.
Try to merge the view into the main body of the query.
Generate and execute a new plan.
The following statement is executed in OceanBase Database:
DELETE employees WHERE employee_id = 200 and department_id = 10;