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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:41:06+00:00 2026-06-08T08:41:06+00:00

I have a table called t1 with a PRIMARY KEY that I will call

  • 0

I have a table called t1 with a PRIMARY KEY that I will call ITEM_ID.
The table is as follows:

ITEM_ID    VALUE1
2          2500
3          3500
5          5500

I also several tables t2 and t3 that are like this:

ITEM_ID    VALUE2
2          250
3          350
4          450
5          550

and

ITEM_ID    VALUE3
2          25
3          35
4          45
5          55
6          65

I want to obtain this (I join keeping only the rows found in t1)

ITEM_ID    VALUE1    VALUE2    VALUE3
2          2500      250       25
3          3500      350       35
5          5500      550       55

I know how to do this using a JOIN and CREATE a new table.
But is it possible to do it just by ALTER, ADD and UPDATE columns?

  • 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-08T08:41:08+00:00Added an answer on June 8, 2026 at 8:41 am
    ALTER TABLE t1 ADD VALUE2 INT, ADD VALUE3 INT;
    
    UPDATE t1 a
    JOIN   t2 b ON a.ITEM_ID = b.ITEM_ID
    JOIN   t3 c ON a.ITEM_ID = c.ITEM_ID
    SET    a.VALUE2 = b.VALUE2,
           a.VALUE3 = c.VALUE3;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say that hypothetically I have a table called Products with a primary key
i have a table called Cars and the primary key of the table is
I have a table called Table with columns: ID (int, primary key, clustered, unique
Let's imagine I have an table called Foo with a primary key FooID and
I have a table called 'MyTable' that looks like: ID | Item | Type
I have a table called prices which includes the closing price of stocks that
I have a MySQL table called employees . There's another table called shifts that
I have a table called Users that stores generic user information (user id, first,
Database: Table: news With the columns: Unique and Primary Key which auto increments called
I have table called stats . In am inserting yes or no in 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.