How to set start value for a column which is autoincrement in android sqlite -


i developing android application in have autoincrement value table , display value in activity have choosen sqlite database in have created table named bill in have set columns want set start value autoincrement column suppose if set start value 1000 first record should 1000 , should incremented 1.

string create_bill_table = "create table " + bill_labels + "("             + bill_id + " integer primary key autoincrement,"             + bill_date + " text,"             + bill_farmername + " text,"             + bill_mobileno + " numeric,"             + bill_producttype + " text,"             + bill_productno + " numeric,"             + bill_productcost + " numeric,"             + bill_totalamount + "numeric" + ");";     db.execsql(create_bill_table); 

can tell me how can achieve in sqlite have little knowledge in sqlite database.

try this:

update sqlite_sequence set seq = 1000 name = 'bill_labels' 

which start autoincrement field 1001.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -