title: LOAD DATA INFILE, skipping first column in table
body: <p>I am having trouble finding the correct syntax for loading a csv file into table, while skipping the first column which already exists in the table. My table columns looks like this:</p>
  
  <pre><code>ID    COL1    COL2    COL3    LOG_DATE
  </code></pre>
  
  <p>and my csv looks like this :</p>
  
  <pre><code>dataForCol1,dataForCol2,dataForCol3
  </code></pre>
  
  <p>So I want to load the values in the csv into COL1 COL2 and COL3 , skipping ID. The closest I can get is with SQL like this:</p>
  
  <pre><code>LOAD DATA LOCAL INFILE 'test.csv'
  INTO TABLE test_table
  FIELDS TERMINATED BY ','
  LINES TERMINATED BY '\n' 
  (ID,COL1,COL2,COL3,LOG_DATE)
  SET ID=0, LOG_DATE=CURRENT_TIMESTAMP
  </code></pre>
  
  <p>Note that I dont know SQL too well and I am not sure if I am using the SET clause correctly either, but this statement will supply the <code>LOG_DATE</code> column with a timestamp, and It will auto increment the <code>ID</code> column (<code>ID</code> is <code>type: int(11</code>) and <code>auto_incerement</code>) but the other data is off by one column so <code>dataForCol1</code> is missing and <code>dataForCol2</code> is in <code>COL1</code> etc.</p>