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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:58:20+00:00 2026-06-07T05:58:20+00:00

I need to update some data from another table.. I want to simply take

  • 0

I need to update some data from another table..

I want to simply take the data from col1 in table1 to col1 in table2, the rows are at the same position so there aint really any id-comparing thats need to be done..

How can I do this?

-----------------------------------------
Db1.Table1 (Take yearModel from this table to update Table3)
-----------------------------------------
imgid          | int | PK |
yearModel      | int |
-----------------------------------------


-----------------------------------------
Db2.Table2 (Go by this table to update Table3)
-----------------------------------------
imgid          | int | PK |
uploadId       | int | FK (With table3.uploadId) |
------------------------------------------

------------------------------------------
Db2.Table3 (Update this table with the yearModel from table1)
-------------------------------------------
uploadId        | int | PK |
uploadYearModel | int |

Sorry, my database diagaram “thingy” has crashed for some wierd reason.. 🙁
I hope you ge the idea

I should also mention that Table1 is located in another database..which Im not sure if that matters.. but well.. 🙂

Thanks in advance!

  • 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-07T05:58:23+00:00Added an answer on June 7, 2026 at 5:58 am

    If you have a Common Key Column in both tables & this key column is having the same values in both tables (they refernce the same rows in both tables ) then below query should work:

    UPDATE  Table1
    SET     Column1 = t2.Column1
    FROM    Table2 t2 INNER JOIN Table1 t1 ON t2.KeyColumn = t1.KeyColumn
    

    EDIT:

    UPDATE Table3 
    SET    uploadYearModel = t1.yearModel 
    FROM   Table1 t1
           INNER JOIN Table2 t2 ON t2.imgid = t1.imgid
           INNER JOIN Table3 t3 ON t3.uploadId = t2.uploadId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to copy some data from one table to another but I need
I need to scrape some website data from a table on a website and
I am using MySQL as database. I need to update some data. However the
i need to update some entry in my data base using jdo in java
I need to use scp update some directory at another server. It is similar
Hit a speed bump, trying to update some column values in my table from
I want to read and save some data from this rss feed to in
I need to retrieve some data stored as varchar in an SQL table to
I have a case where I need to update a jqgrid based on some
I need to update a lot of rows, per a user request. It is

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.