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

  • Home
  • SEARCH
  • 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 7951697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:38:19+00:00 2026-06-04T02:38:19+00:00

I have this really simple query. I am unable to figure out why my

  • 0

I have this really simple query. I am unable to figure out why my query is not returning null records.

SELECT table1.name, table2.name 
FROM table 
LEFT OUTER JOIN table2 
ON table1.id = table2.id 
WHERE table1.someid='2' 
AND table2.someid=2 
ORDER BY table1.order

I also tried using LEFT JOIN, JOIN, INNER JOIN, FULL OUTER JOIN gives an error.

This simple query returns all required values.

SELECT table1.name 
FROM table 
WHERE table1.someid='2' 
ORDER BY table1.order
  • 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-04T02:38:20+00:00Added an answer on June 4, 2026 at 2:38 am

    whatever you will put in the where clause will force the resultsets to return the rows from the affected table.

    In your case you are asking for table2.someid=2, which for mysql means that table2 MUST return a row, with or without a left join.

    Solution: use this filter within the left join instead of the where clause

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

Sidebar

Related Questions

I'm sure this is really simple... just tired now. I have a query SELECT
This might be really simple, but i cannot figure out the problem with this
This should be really simple, but I have tried many solutions posted on the
A really simple shell script question. I have a file with something like this:
I really don't understand this. I have a simple ASP with 3 div in
I have this case <WrapPanel> <CheckBox>Really long name</CheckBox> <CheckBox>Short</CheckBox> <CheckBox>Longer again</CheckBox> <CheckBox>Foo</CheckBox> <Slider MinWidth=200
I have a query which is something like this SELECT t.category, tc.product, tc.sub-product, count(*)
This seems to be a really simple query, but somehow I keep getting errors...
I have this simple T-SQL query, it emits a bunch of columns from a
This sounds simple enough but I haven't been able to figure out how to

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.