Home > Ask the Oracle Database / Applications Experts > Oracle PL/SQL Questions & Answers > Unable to alter view
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Unable to alter view

Advice from previous expert, Greg Williams EXPERT RESPONSE FROM: Advice from previous expert, Greg Williams

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 29 November 2006
I've created a view called 'CONTACT.' But later, I need to alter the CONTACT view to 'with read only.' I try to alter it with the ALTER command, but it doesn't work. Do you have any idea what's wrong? Thanks for your help in advance.
SQL> create view contact
  2  as select contact, name, phone
  3  from publisher;

View created.

SQL> alter view contact (contact, name, phone
  2  as select contact, name, phone
  3  from publisher
  4  with read only;

alter view contact (contact, name, phone)
                   *
ERROR at line 1:
ORA-00922: missing or invalid option

>
The view you are trying to create is by default read only -- "with read only" is invalid and to alter a view use "compile or replace view <view name>." You cannot update a view. You can update the underlying tables by using an instead-of trigger.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Oracle PL/SQL
How to concatenate rows into a single CLOB in PL/SQL
Working with substitution variables and using EXECUTE IMMEDIATE in PL/SQL
How to open a ref cursor in a PL/SQL procedure
Converting Long Raw to Blob
Parsing in Oracle
ORA-01422 error when procedure returns more than one row
Definition of force view
ORA-04082: NEW or OLD references not allowed in table level triggers
Execute SQL statement from table in other schema
Script to revoke access from user

Using Oracle PL/SQL
Oracle tutorial library: SearchOracle.com's learning guides
SELECT statement syntax and examples
Oracle PL/SQL tutorial
PL/SQL datatypes in Oracle
Stored procedures in PL/SQL
PL/SQL functions and triggers in Oracle
How to concatenate rows into a single CLOB in PL/SQL
How to open a ref cursor in a PL/SQL procedure
Working with substitution variables and using EXECUTE IMMEDIATE in PL/SQL
Oracle's free SQL Developer adds database migration tool

Oracle error messages
Why am I receiving Oracle memory allocation errors?
Oracle tutorial library: SearchOracle.com's learning guides
Oracle error 6550 may mean incorrect Oracle export version
Why does the archive log in Oracle give me the ORA-16032 error?
Are we getting the ORA-00382 error because we're at maximum block size?
How do I solve the ORA-00257 error in Oracle?
Solving common Oracle errors guide
Error during RMAN backup
ORA-12560 error with Oracle 10g Instant Client
Unable to view Oracle tables in NetBeans

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
PL/SQL  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts