Insert into table without all values
<p>Specifically, how would I insert into sqlite3 database and python without using all the values.</p>

<p>If my table is setup like this:</p>

<pre><code>People:    
f_name | l_name | age | favorite_color
</code></pre>

<p>When I create a new row, how would I be able to only put in a few values like this:</p>

<pre><code>c.execute("INSERT INTO People VALUES (?, ?)", (f_name, l_name))
</code></pre>

<p>Right now it would give an error for only filling two of the four columns.</p>

<p>1) INSERT statement doesn't automatically know what value goes where if you omit some parameters. It is generally good practice to explicitly mentioning the names of the columns. e.g: INSERT INTO People (f_name, l_name)</p>

<p>2) If those columns aren't nullable then you can't omit them at all!</p>

python sqlite3