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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:22:04+00:00 2026-05-28T17:22:04+00:00

I have two tables data1 and data2. Data1 contains contains 2 columns, emailaddress and

  • 0

I have two tables data1 and data2.
Data1 contains contains 2 columns, emailaddress and name, but the name column is empty.

emailaddress    name
email1
email2
email3

Data2 Contains also contains 2 columns, emailaddress and name, and has more entries than data1

email address   name
email1          name1
email1b         name1b
email2          name2
email2b         name2b
email3          name3
email3b         name3b

I’m trying to write an SQL query that compares the email address column from Data1 and Data2, and when it finds a match, the associated name from Data2 is inserted into the corresponding name field for data1.

Data1 would should look like this after the query has been run

emailaddress    name
email1          name1
email2          name2
email3          name3

I just can’t seem to figure out how to do this. Any help much appreciated.

  • 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-05-28T17:22:05+00:00Added an answer on May 28, 2026 at 5:22 pm

    Give this a try:

    UPDATE data1 a, Data2 b
    SET a.name= b.name
    WHERE a.emailaddress = b.emailaddress
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables, both with the same columns. The first table contains original
I have a two tables, one that contains basic resource info, with columns and
We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType
I have two tables: block: int id, [other columns...] blockInstance: int id, int blockId
I have two tables like so: EventTable (EID, Name, EventTime) VideoTable (VID, StartTime, Video,
I have two tables, both have the same columns. We will call them tilistings
I have these two tables: Table: ORDERS ID - NAME - DATA --------------------------------------------- 1
I have two MySQL tables say A and B. A contains just one varchar
What I have are two tables: mark_notifications mark_notifications_options The mark_notifications table contains rows of
I have a table with three columns; the first column contains IDs and the

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.