I create table like this:

db.execute('create table if not exists customers ' +
                                           ' ( ' +
                                           '   id int PRIMARY KEY, '            
+
                                           '   first_name varchar(30) '   +

                                           ' )');


however,  when i insert data like this:

db.execute("insert into customers('first_name') values (?, ?)",
['Monkey!']);

I got the result is :

id      first_name
null    Monkey!

id is null !





On Feb 17, 4:54 pm, Alex <[email protected]> wrote:
> Hi all,
>
>       how to  implement id auto increase when i insert a data to gears  
> database(sqlite3)  ?
>
>       Thanks !
>
> Alex

Reply via email to