Create the MySQL table and autofill a column using monthname function
<p>Not sure how to use <code>monthname</code> function while creating a table in MySQL. All I trying to do is when is entered in a Column A then the Column B should fill the month name in words based on the input in column A.</p>

<p>I am using a simple html form to post the values to MySQL. 
User fills the HTML data's like Name, Orderno, order date, Quantity and item name.</p>

<p>These values are posted to MySQL table orderdata. 
MySQL table has columns like id, name, orderno, order_date, order_month, quantity and item_name.</p>

<p>Want the order_month column to auto fill month name based on the order_date.</p>

<p>Below are the syntax I tried </p>

<pre><code>create table orderdata (id int, order_date date, order_month DEFAULT ON UPDATE MONTHNAME(order_date),quantity int,item_name varchar(50));
</code></pre>

<blockquote>
  <p>ERROR 1064 (42000): You have an error in your SQL syntax; check the
  manual that corresponds to your MySQL server version for the right
  syntax to use near 'DEFAULT ON UPDATE MONTHNAME(order_date),quantity
  int,item_name varchar(50))' at line 1</p>
</blockquote>

<pre><code>create table orderdata (id int, order_date date, order_month UPDATE test.orderdata SET month= MONTHNAME(order_date),quantity int,item_name varchar(50));
</code></pre>

<blockquote>
  <p>ERROR 1064 (42000): You have an error in your SQL syntax; check the
  manual that corresponds to your MySQL server version for the right
  syntax to use near 'UPDATE test.orderdata SET month=
  MONTHNAME(order_date),quantity int,item_name va' at line 1</p>
</blockquote>

<p>Any help to make this much appreciated</p>

<p>Thank you</p>