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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:27:19+00:00 2026-05-29T05:27:19+00:00

TABLE A >> uid name 1 test1 2 test2 3 test3 4 test4 TABLE

  • 0
TABLE A >>
uid name
1   test1
2   test2
3   test3
4   test4

TABLE B >>
uid address
1   address1
2   address2
4   address3

RESULT
1   test1   address1
2   test2   address2
3   test3
4   test4   address3

Can anyone show me how to write a query and fetch the result as above, Thanks very much!
i have tried join, left and right join. all result nothing.

  • 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-29T05:27:20+00:00Added an answer on May 29, 2026 at 5:27 am

    You can write left outer join between this two tables Best way to understand is check the below image

    Query for your requirement

    SELECT A.uid, A.name, B.address FROM A LEFT JOIN B ON A.uid=B.uid 
    

    Reading this original article on The Code Project will help you a lot: Visual Representation of SQL Joins.

    alt text

    Find original one at: Difference between JOIN and OUTER JOIN in MySQL.

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

Sidebar

Related Questions

Given the following table structure: CREATE TABLE user ( uid INT(11) auto_increment, name VARCHAR(200),
This is my table structure fName Friend's Name [Varchar] fUID Friend's ID [Int] UID
I Have MySQL DB table tbl_users , which has two uid , name ,
table ad: id uid name description 1 1 BMW Z5 good condition 2 1
DB table User with a column name uid, create a method uid in the
I have these tables: USER TABLE uid | name | role | | 1
I have the following table: UID | Limit |Type 8 | 4 |A 8
I have a table 'articles' : id / uid / last_update / content. I
I have the following table (points): recno uid uname points ============================ 1 a abc
Database setup (MySQL) table: top_fives id, uid, first, second, third, fourth, fifth, creation_date 1,

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.