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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:01:03+00:00 2026-06-01T08:01:03+00:00

Table1 ID Loc ———– 001 null 002 null 003 PYD 004 null …. Table2

  • 0

Table1

ID     Loc
-----------
001    null
002    null
003    PYD
004    null
....

Table2

ID     Loc
-----------
001    TMB
002    null
003    PYD
004    SHD
....

I want to update table1 from table2. I’d need something like this:

update table1 set LoC = Select LoC from table2

And the expected output:

Table1

ID     Loc
-----------
001    TMB
002    null
003    PYD
004    SHD
....

How do I update table1 from table2?

  • 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-01T08:01:04+00:00Added an answer on June 1, 2026 at 8:01 am

    try something like:

    update t
     set t.loc = t2.loc
     from table1 t
     inner join table2 t2 on t.id =t2.id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Table1 ID | WorkTime ----------------- 001 | 10:50:00 001 | 00:00:00 002 | ....
Table1 ID product 001 LG 001 Sony 001 LG 001 LG 001 Sony 001
Table1 Date id salary 01/2012 001 1500 01/2011 001 750 01/2010 001 500 from
Table1: ResourceID Name0 (STRING) NumberOfLongons0 (INT) LastLogon0 (DateTIME) Table2: ResourceID NetbiosName0 I am trying
I have records in table1, if the records exist, it must copy into table2.
I have Table1 and Table2 related on Table1.ID. There can be zero or more
Table1 Time 10:00:00 12:00:00 Absent 14:00:00 Holiday ..., Time column Datatype is varchar I
UPDATE table1 SET col = 1 WHERE col2 = 'xyz' UPDATE a SET col
Using Access 2003 Database Table1 Intime Outtime WorkTime OverTime 08:00:00 19:00:00 09:00:00 02:00:00 09:00:00
I have a 2 tables - rout and loc . Table Rout Columns: Id

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.