title: Update table when there is a foreign key
body: <p>Table:</p>
  
  <pre><code>FILM (Catalog_Num(pk), Format, Title, Year, Number_Discs, Rating, Timing, Genre) 
  
  INVENTORY (Film_ID(pk), Rental_Price, New, Date_In, Catalog_Num@, Store_Num@)
  </code></pre>
  
  <p>Here is part of the film table, and there are some wrong in the content, for example: 23W should be 23F because its format is <strong>F</strong>ull Screen.  </p>
  
  <pre><code>CATALALOG_NUM FORMAT
  ------------- --------------------
  16W           Wide Screen
  17F           Full Screen
  23W           Full Screen
  24F           Full Screen
  </code></pre>
  
  <p>I have to update the content in the film table if there is mistake.
  Here is what I've tried:</p>
  
  <pre><code>update film
  set catalog_num = REPLACE(catalog_num,substr(catalog_num, -1, 1),substr(format, 1,1))
  </code></pre>
  
  <p>What I think is to directly replace all the last character in catalog_num column by the first character in format column.
  However, since there is foreign key between these 2 tables, I get the error:</p>
  
  <pre><code>ERROR at line 1:
  ORA-02292: integrity constraint (SYS.INVENTORY_CATALOG_FK) violated - child record found
  </code></pre>
  
  <p><strong>Is there any solution to solve this problem within one query and do not need to use cascade or disable the constraint?</strong>
  Thanks!!</p>