0

I am gonna to add a LineNo to a table and how can I make it will auto increment by 1? LineNo is no the primary key so how I make it will will auto increment by 1?

This is what I tried, but no working: String query_edit = "UPDATE " + TABLE_NAME_INV_DTL + " SET " + COL15_INV_DTL + "= +1 "; db.execSQL(query_edit);

Venus Lu
  • 11
  • 3
  • Does this answer your question? [SQLite - increase value by a certain number](https://stackoverflow.com/questions/744289/sqlite-increase-value-by-a-certain-number) – Tess2552 May 28 '21 at 13:42

1 Answers1

0

Try this

String query_edit = "UPDATE " + TABLE_NAME_INV_DTL + " SET " + COL15_INV_DTL + "=" + COL15_INV_DTL + " +1 "; 
db.execSQL(query_edit);
Tess2552
  • 86
  • 1
  • 3