title: Is it possible to import a CSV file to an existing table without the headers being included?
body: <p>I'm trying to import a CSV file to a table that is empty but already exists in an SQLite database. For example:</p>
  <pre><code>sqlite&gt; CREATE TABLE data (...);
  sqlite&gt; .mode csv
  sqlite&gt; .import mydata.csv data
  </code></pre>
  <p>I have created the table in advance because I'd like to specify a primary key, data types, and foreign key constraints. This process works as expected, but it unfortunately includes the header row from the CSV file in the table.</p>
  <p>Here's what I've learned from the SQLite docs regarding CSV imports:</p>
  <blockquote>
  <p>There are two cases to consider: (1) Table &quot;tab1&quot; does not previously exist and (2) table &quot;tab1&quot; does already exist.</p>
  <p>In the first case, when the table does not previously exist, the table is automatically created and the content of the first row of the input CSV file is used to determine the name of all the columns in the table. In other words, if the table does not previously exist, the first row of the CSV file is interpreted to be column names and the actual data starts on the second row of the CSV file.</p>
  <p>For the second case, when the table already exists, every row of the CSV file, including the first row, is assumed to be actual content. If the CSV file contains an initial row of column labels, that row will be read as data and inserted into the table. To avoid this, make sure that table does not previously exist.</p>
  </blockquote>
  <p>So basically, I get extra data because I've created the table in advance. Is there a flag to change this behavior? If not, what's the best workaround?</p>