title: alter table statment to insert duplicate into another table
body: <p>I have a table in which there is a column name with <code>SP varchar(10) NOT NULL</code>. I want that column always to be unique so i created unique index on that column . My table schema as follows :</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `tblspmaster` (
    `CSN` bigint(20) NOT NULL AUTO_INCREMENT,
    `SP` varchar(10) NOT NULL,
    `FileImportedDate` date NOT NULL,
    `AMZFileName` varchar(50) NOT NULL,
    `CasperBatch` varchar(50) NOT NULL,
    `BatchProcessedDate` date NOT NULL,
    `ExpiryDate` date NOT NULL,
    `Region` varchar(50) NOT NULL,
    `FCCity` varchar(50) NOT NULL,
    `VendorID` int(11) NOT NULL,
    `LocationID` int(11) NOT NULL,
    PRIMARY KEY (`CSN`),
    UNIQUE KEY `SP` (`SP`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10000000000 ;
  </code></pre>
  
  <p>Now i want that if anybody tries to insert duplicate record then that record should be inserted into a secondary table name <code>tblDuplicate</code>. </p>
  
  <p>I have gone through this question <a href="https://stackoverflow.com/questions/812437/mysql-ignore-insert-error-duplicate-entry">MySQL - ignore insert error: duplicate entry</a> but i am not sure that instead of </p>
  
  <pre><code>INSERT INTO tbl VALUES (1,200) ON DUPLICATE KEY UPDATE value=200;
  </code></pre>
  
  <p>can i insert duplicate row into another table ? </p>
  
  <p>what changes needed to be done in main table scheme or index column ?</p>
  
  <p>**Note : Data will be inserted by importing excel or csv files and excel files generally contains 500k to 800 k records but there will be only one single column ** </p>