Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7858831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:37:21+00:00 2026-06-02T21:37:21+00:00

Ok, we see here that the SQLite insert statement returns something called row id

  • 0

Ok, we see here that the SQLite insert statement returns something called row id.

When inserting, we know that SQLite likes a primary key column called ID and will auto-generate an appropriate value if the ID value being inserted is null.

The glue that’s missing is confirmation that the row id returned by the SQLiteDatabase.insert() method is in fact the value that was auto-generated for the row’s primary key. (This is not the case for Oracle…)

Will someone confirm or deny, please?

Resolution

Ok, so from the link posted by @sixfeetsix:

Each entry in an SQLite table has a unique 64-bit signed integer key called the “rowid”. The rowid is always available as an undeclared column… If the table has a column of type INTEGER PRIMARY KEY then that column is another alias for the rowid.

Then his auto-increment link verifies that the row_id and the auto-increment value will be the same value.

That’s a wrap, thanks, folks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:37:25+00:00Added an answer on June 2, 2026 at 9:37 pm

    The Android insert(…) method returns:

    the row ID of the newly inserted row, or -1 if an error occurred

    This can be confusing to the uninitiated, but the row id in sqlite is either the integer primary key field, or, in its absence, a 64-bit undeclared column named ROWID.

    So when you insert either NULL or no value in an auto-increment field, the generated value is returned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Reading about Delphi's Exit statement (see here for instance), I cannot ignore that writing
I often see people asking XML/XSLT related questions here that root in the inability
I have some code that is using SyncEnumerator. As you can see here ,
Notice that I am asking for little-o here (see similar question here ) -
I see this question here on SO but I am not sure that answers
I have a div that contains 3 fields You can see the image here
EDIT: See this in action here: http://jsbin.com/emobi/5 -- and that's using mouseenter/mouseleave. I have
A term that I see every now and then is Cyclomatic Complexity. Here on
Here's my code. See the line that is commented out. When the element id
Had a good search here but can't see anything that gets my mind in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.