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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:51:43+00:00 2026-06-10T09:51:43+00:00

This is quite easy and has been asked multiple times but I can’t get

  • 0

This is quite easy and has been asked multiple times but I can’t get it to work.
The SQL query I think should work is:

    UPDATE table2
       SET dst.a = dst.a + src.a,
           dst.b = dst.b + src.b,
           dst.c = dst.c + src.c,
           dst.d = dst.d + src.d,
           dst.e = dst.e + src.e
      FROM table2 AS dst 
INNER JOIN table1 AS src
        ON dst.f = src.f
  • 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-10T09:51:44+00:00Added an answer on June 10, 2026 at 9:51 am

    Using the update statement it is not possible because in sqlite joins in an update statement are not supported. See docs:
    update statement

    If you only wanted to update a single column to a static value, you could use a subquery in the update statement correctly. See this example: How do I make an UPDATE while joining tables on SQLite?

    Now in your example, making an assumption that there is a unique key on “column f” – a workaround/solution I have come up with is using the replace statement:

    replace into table2
    (a, b, c, d, e, f, g)
    select src.a, src.b, src.c, src.d, src.e, dest.f, dest.g
    from table1 src
    inner join table2 dest on src.f = dest.f
    

    I also added an extra column to table2 “column g” to show how you’d “update” only some of the columns with this method.

    One other thing to be cautious about is if you use “PRAGMA foreign_keys = ON;” it’s possible to have issues with this as the row is effectively deleted and inserted.

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

Sidebar

Related Questions

I know this question has been asked a couple of times, but there's something
This seems like it should be easy, but I can't quite find an explanation
Sorry if this has been asked elsewhere, I've been looking and can't find it
This probably has probably been asked before, but I couldn't find anything relevant. Would
This has been asked before (question no. 308581) , but that particular question and
Sorry if you feel like this has been asked but I have read the
I've been reading on this quite some time...and i'm puzzled - Can you help
Hopefully this has an easy answer I just haven't been able to find: I
There has to be a easy solution to this. I have been trying to
This seems like it should be really easy but I've been having trouble with

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.