title: A primary must include all columns in the table's partitioning location error?
body: <p>I tried to create a table with range partitioning. But it shows the following error:</p>
  
  <blockquote>
    <p>A primary must include all columns in the table's partitioning
    location.</p>
  </blockquote>
  
  <p>This is my SQL statement:</p>
  
  <pre><code>CREATE TABLE `tbl_emp_confirmation` (
    `fld_id` int(11) NOT NULL AUTO_INCREMENT,
    `fldemp_id` varchar(100) DEFAULT NULL,
    `fldempname` varchar(100) DEFAULT NULL,
    `fldjoindate` varchar(100) DEFAULT NULL,
    `fldconfirmdate` Date NOT NULL,
    `fldresigndate` varchar(100) DEFAULT NULL,
    `fldstatus` varchar(50) DEFAULT NULL,
    `fldcon_status` varchar(100) DEFAULT NULL,
    UNIQUE KEY `fld_id` (`fld_id`),
    KEY `in_empconfirmation` (`fldemp_id`,`fldempname`,`fldjoindate`,`fldconfirmdate`)
    ) PARTITION BY RANGE ( Month(fldconfirmdate))
    (PARTITION p_JAN VALUES LESS THAN (TO_DAYS('2011-01-01')),
   PARTITION p_FEB VALUES LESS THAN (TO_DAYS('2011-02-01')),
   PARTITION p_MAR VALUES LESS THAN (TO_DAYS('2011-03-01')),
   PARTITION p_APR VALUES LESS THAN (TO_DAYS('2011-04-01')),
   PARTITION p_MAY VALUES LESS THAN (TO_DAYS('2011-05-01')),
   PARTITION p_MAX VALUES LESS THAN MAXVALUE );
  </code></pre>