title: View is not insertable, if it contains sub query in FROM clause
body: <p>I have a <strong>mysql view</strong> which has sub query in <strong>FROM</strong> clause. This view is updatable. I tried updating single table and it worked fine. But I am not able to insert into that table. It says :</p>
  
  <blockquote>
    <p>Error Code: 1471. The target table action_view of the INSERT is
    not insertable-into</p>
  </blockquote>
  
  <p>mysq view : </p>
  
  <pre><code>    CREATE OR REPLACE
  VIEW `action_view` AS
      SELECT 
          `ca`.`id` AS `id`,
          `cah`.`title` AS `title`,
          `ca`.`idCareActionHead` AS `idCareActionHead`,
          `ca`.`idPeople` AS `idPeople`,
          `ca`.`assignedTo` AS `assignedTo`,
          `ca`.`dueDate` AS `dueDate`,
          `note`.idCareAction AS `idCareAction`
      FROM
         `care_action` `ca`
          JOIN `care_action_head` `cah`
          JOIN `people` `p`
          JOIN (SELECT 
              `cn`.`idCareAction` AS `idCareAction`
          FROM `care_note` `cn`) `note`
  
      WHERE
          `ca`.`idCareActionHead` = `cah`.`id`
              AND (`ca`.`idPeople` = `p`.`id`)
              AND (`note`.`idCareAction` = `ca`.`id`)
  </code></pre>
  
  <p>update query which works fine :</p>
  
  <pre><code>update action_view set idCareActionHead = 1 where action_view.id =25;
  </code></pre>
  
  <p>Insert query which gives the above mentioned error : </p>
  
  <pre><code>insert into action_view (idCareActionHead, idPeople) values (12, 4);
  </code></pre>
  
  <p>I have referred the latest mysql docs </p>
  
  <p><a href="https://dev.mysql.com/doc/refman/5.7/en/view-updatability.html" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/5.7/en/view-updatability.html</a><a href="https://dev.mysql.com/doc/refman/5.7/en/view-updatability.html" rel="nofollow noreferrer">1</a> which talks about sub queries within the <code>SELECT</code> statement, but does not say anything regarding sub queries in <code>FROM</code> clause.</p>
  
  <p>My question is, is it possible to insert into view which has sub query in <code>FROM</code> clause in mysql or am I doing anything wrong here?</p>