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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:56:04+00:00 2026-06-16T23:56:04+00:00

I have two tables. The data in those are something like below: Table 1:

  • 0

I have two tables. The data in those are something like below:

Table 1:

Col1      Col2
----------------
A          A1
A          A2
A          A3
B          B1
B          B2
B          B3

Table 2:

Col1        Col2
------------------
A            A1
A            A4
A            A5
B            B1
B            B4
B            B5

I need to bring out the difference in data in Col2 of two tables based on the values in Col1. The output should look something like below:

Output:

Col    MismatchValuesInTable1     Mismatchvaluesintable2
---------------------------------------------------------
A               A2                       A4
                A3                       A5
B               B2                       B4
                B3                       B5

Please help me with a query to achieve the above.

  • 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-16T23:56:05+00:00Added an answer on June 16, 2026 at 11:56 pm
    select isnull(t1.Col1,t2.Col2) as Col,
      t1.Col2 as MismatchValuesInTable1, 
      t2.Col2 as MismatchValuesInTable2
    
    from t1
    FULL JOIN t2 on (t1.Col1=T2.Col1) and (t1.Col2=t2.Col2)
    where t1.Col2 is null or t2.Col2 is null
    order by Col
    

    SQLFiddle demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two Tables: Table 1: Questions : QuestionId NUMERIC Title TEXT Test Data
1I have the following two tables (sample data) and need to be able to
I have two tables set up in phpmyadmin- table userid and table data. The
I have two tables with the following (simplified) structures: table "Factors" which holds data
I have two different tables from which I need to pull data blogs which
i have two data tables with the same structure the first one has one
I have a database with two tables: data and file . file_id is a
I have a table storing millions of rows. It looks something like this: Table_Docs
i have this LINQ query on two tables public ViewResult data() { var query
I have two tables, XMLtable and filterTable . I need all the XMLtable.ID values

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.