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 8456181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:28:52+00:00 2026-06-10T12:28:52+00:00

The SQLite statement INSERT OR REPLACE INTO replaces the row if it already exists.

  • 0

The SQLite statement INSERT OR REPLACE INTO replaces the row if it already exists. But when I run the same statement again and again, it keeps on inserting instead of replacing.

In what case does REPLACE actually occur?

INSERT OR REPLACE INTO names (rollno, name) VALUES (1, "Adam")
  • 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-10T12:28:53+00:00Added an answer on June 10, 2026 at 12:28 pm

    The replace occurs if the row you want to insert has the same PRIMARY KEY as another in your table.
    You probably forgot to define a primary key.

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

Sidebar

Related Questions

I use the code below to insert data into my sqlite-database but for some
I have written dynamic insert part.When I excute he Insert statement into sqlite browser
Ok, we see here that the SQLite insert statement returns something called row id
In the following SQL statement, SQLite sorts correctly but MySQL does not: However, if
I am attempting to insert data into a local SQLITE database file from a
While parsing the data I insert the data in sqlite. But for some reason
What does statement insert in SQLite return in case of success? I always believed
I am inserting data into a table and sqlite3_step returns SQLITE_DONE. But sometimes there
SQLite insert statement does not insert the new data i am using this code
I want to update a row if it exists in the table else insert

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.