View WITH READ ONLY
View WITH READ ONLY is a SQL statement in the Views category. Oracle: prevents INSERT, UPDATE, or DELETE operations through the view. Oracle-specific. The syntax is CREATE VIEW view_name AS select_statement WITH READ ONLY;. It returns read-only view. A typical example: CREATE VIEW employee_report AS SELECT id, name, department, salary FROM employees WHERE status = 'active' WITH READ ONLY; -- Cannot INSERT/UPDATE/DELETE through this view -- SELECT only A close relative is CREATE VIEW, which creates a virtual table based on a SELECT query. Think of it as a saved query that acts like a table. A close relative is DROP VIEW, which removes a view from the database. Does not affect the underlying tables. A close relative is ALTER VIEW, which modifies an existing view definition. More about this category: Database views — CREATE VIEW, DROP VIEW, ALTER VIEW, materialized views. Related Views entries: CREATE VIEW, DROP VIEW, ALTER VIEW, MATERIALIZED VIEW, CREATE OR REPLACE VIEW, WITH CHECK OPTION, INDEXED VIEW (WITH SCHEMABINDING), View WITH ENCRYPTION.