Jignesh Ansodariya
Jignesh Ansodariya

Reputation: 12695

How to create a new raw in sqlite database in Android?

I have a Table in sqlite and there is a auto increment field for ID name of field is "profile_id".

now I want to add a new row without any data except profile_id, and I need the value of "profile_id" of newly created row, Than what should my query, please suggest me.

Thanks!

Upvotes: 0

Views: 125

Answers (1)

kjurkovic
kjurkovic

Reputation: 4104

You should do an insert with empty values. Insert command returns id: long id = db.insert(...);

Upvotes: 1

Related Questions