title: Mysql ,how to add two new columns and insert data at the same time?
body: <p>It's my code</p>
  
  <pre><code>alter table num_of_people add column date_pre varchar(40);
  alter table num_of_people add column time_pre varchar(40);
  </code></pre>
  
  <p>The result like this:
  <a href="http://i.stack.imgur.com/LSYzN.jpg" rel="nofollow">enter image description here</a></p>
  
  <p>But I can't insert new data into these two columns：</p>
  
  <pre><code>insert into num_of_people(date_pre,time_re) select left(Deal_time,8),right(Deal_time,2) from num_of_people;
  </code></pre>
  
  <p>Nothing happened:
  <a href="http://i.stack.imgur.com/KQ3Ss.png" rel="nofollow">enter image description here</a></p>
  
  <p>I create a new table,that's worked:</p>
  
  <pre><code>create table Date_time(
   date_p varchar(40),
   time_p varchar(40)
  );
  
  insert into date_time(date_p,time_p) select left(Deal_time,8),right(Deal_time,2) from num_of_people;
  </code></pre>
  
  <p>So,Why?
  I just want to split the charactor in column <code>Deal_time</code> of table <code>num_of_people</code>. What's the better way? I am a novice in MySQL.Thanks a lot.</p>