Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







ORA-01779 on SQL update tips

Oracle Database Tips by Donald Burleson

Updated August 9, 2015


Question: I cannot get this update to run and I get the ORA-01779 error:

ORA-01779: cannot modify a column which maps to a non key-preserved table.
      src.object_name AS src_name,
      src.object_type AS src_type,
      tgt.object_name AS tgt_name,
      tgt.object_type AS tgt_type,
      source_table src,
      target_table tgt
      src.object_id = tgt.object_id)
   tgt_name = src_name,
   tgt_type = src_type;


Answer:  Using the oerr utility, the Oracle docs note this on the ORA-01779 error:

ORA-01779: cannot modify a column which maps to a non key-preserved table

Cause: An attempt was made to insert or update columns of a join view which map to a non-key-preserved table.

Action: Modify the underlying base tables directly.

In your case, the ORA-01779 results because the update statement is malformed (by using an in-line view on two tables) and you want to issue the SQL update directly against one individual table, not the two tables that are specified in your DML syntax.

Views can be updated under the right conditions, in which case, the ORA-01779 will not be an issue.  

Some views support inserts while at the same time rejecting updates.  

Whether a view can be updated depends on the keys from the underlying table or tables.

The answer to the question of whether or not a particular view is updatable is directly  related to the difference between simple and complex views.

Generally, DML can be performed against the view if the base table is key-preserved.

DML is not allowed in situations where duplicate data exists but is suppressed, like with the DISTINCT operator.  Attempting an update using DISTINCT is not allowed because Oracle has no way of knowing which record should be updated.

Thus, with complex views, some columns may be updated and some may not.  This is decided by the table from which the column comes and if there is a primary key or key-preserved value that can be determined.

The ORA-01779 will result if you have inaccurately assessed your table for primary key or key-preserved value integrity.

Follow the jump for more good information on views.




Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.