title: Error Code: 1364. Field 'AddressID' doesn't have a default value
body: <p>I'm receiving the above error when I try to perform the following query:</p>
  
  <pre><code>insert into person_address(PersonID)
  select personID from person;
  </code></pre>
  
  <p>So basically what I'm trying to achieve is to insert data from my primary keys into my foreign keys as they were not linked when data was first entered into the person table. </p>
  
  <p>Am I correct in inserting this data and then creating a stored procedure with an update query to update these tables in future?</p>
  
  <p>Table structures:</p>
  
  <p>person_address (to contain foreign keys of both person and address tables and where I'm trying to insert the values)</p>
  
  <pre><code>AddressID   int(11) NO  PRI     
  PersonID    int(11) YES MUL 
  </code></pre>
  
  <p>person: </p>
  
  <pre><code>personID    int(11) NO  PRI     auto_increment
  Forename    varchar(30) YES         
  Surname varchar(30) YES         
  PhoneNumber varchar(15) YES         
  Email   varchar(100)    YES         
  </code></pre>
  
  <p>address:</p>
  
  <pre><code>addressID   int(11) NO  PRI     auto_increment
  line1   varchar(100)    YES         
  line2   varchar(100)    YES         
  county  varchar(50) YES         
  postcode    varchar(8)  YES         
  country varchar(20) YES         
  </code></pre>