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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:36:09+00:00 2026-05-27T12:36:09+00:00

i have two temporary table Table 1 ID1 Name ID2 Single —————————————————- 1 ABC

  • 0

i have two temporary table
Table 1

 ID1         Name        ID2            Single
----------------------------------------------------
 1            ABC         1            100
 2            DEF         1            200

Table 2

 ID1         Name        ID2           Monthly
----------------------------------------------------
 3            PQR         2            500
 4            LMN         2            600

I want Output

 ID1         Name        ID2            Single   Monthly
--------------------------------------------------------
 1            ABC         1            100        NULL
 2            DEF         1            200        NULL
 3            PQR         2            NULL       500
 4            LMN         2            NULL       600

I used all Joins nothing working
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-05-27T12:36:10+00:00Added an answer on May 27, 2026 at 12:36 pm

    JOIN won’t work for that case, you need to use UNION here:

    SELECT ID1, NAME, ID2, Single, NULL FROM Table1
    UNION ALL
    SELECT ID1, NAME, ID2, NULL, Monthly FROM Table2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have two temporary table Table 1 ID1 Name ID2 Single ---------------------------------------------------- 1 ABC
I have two identical tables and need to copy rows from table to another.
I have two tables from two different databases. For example: Table: Articles1 - Database:
I have two tables, Hello and World: Hello has two columns id(int) and id1(int,
I have a temporary table I'm creating in a sproc that houses my user
I have created a sql function in SQLServer 2008 that declared a temporary table
I have written below stored procedure. In which i need to create Two Temporary
I have two mysql tables: /* Table users */ CREATE TABLE IF NOT EXISTS
I have two tables, users and followers : Table users : id INT, PRIMARY_KEY
Have two folders with approx. 150 java property files. In a shell script, how

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.