title: A not null constraints failed
body: <blockquote>
    <p>org.sqlite.SQLiteException: [SQLITE_CONSTRAINT_NOTNULL]  A NOT NULL
    constraint failed (NOT NULL constraint failed: stock.id)</p>
  </blockquote>
  
  <p>I have three columns in my SQLite DB which are <code>id</code>, <code>pname</code>, <code>mrp</code> but I just want to insert data into two columns,
  then I did this </p>
  
  <pre><code>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { 
      try {
          Class.forName("org.sqlite.JDBC");
          Connection con = DriverManager.getConnection("jdbc:sqlite:qmb.db");
          String query="INSERT INTO stock(pname,mrp) VALUES('"+jTextField2.getText()+"','"+jTextField5.getText()+"');";
          executeSQlQuery(query, "Inserted");   // TODO add your handling code here:
      } catch (ClassNotFoundException | SQLException ex) {
          Logger.getLogger(UpdateStock.class.getName()).log(Level.SEVERE, null, ex);
      }
  }    
  </code></pre>
  
  <p>I just want to be able to insert rows by clicking on a button into the database</p>