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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:54:34+00:00 2026-06-18T11:54:34+00:00

I’ve been lurking here for a few months and learning a lot from reading

  • 0

I’ve been lurking here for a few months and learning a lot from reading other questions, but this is the first time I’ve been brave enough to ask one!

SELECT  * FROM tableA a
JOIN tableB b ON b.tableBid = a.tableBid
WHERE a.tableAcol = 'paramValue';

I only have 39 rows in table B and for everyone of these there IS a row in tableA for paramValue with a matching tableBid, so I would expect to get 39 rows back. And indeed in another database instance I do.

I can’t see any significant differences in the instances, though this could be ignorance, but in this new instance I only get 7 records with the same query.

If I change the query to

SELECT  * FROM tableA a
LEFT JOIN tableB b ON b.tableBid = a.tableBid
WHERE a.tableAcol = 'paramValue';

or

SELECT  * FROM tableA a
LEFT JOIN tableB b ON a.tableBid = b.tableBid
WHERE a.tableAcol = 'paramValue';

then I get the 39 rows I expect with a.tableBid matching b.tableBid in all cases and no nulls

I am clearly confused. Can anyone explain this please.

Can’t post the real data but I can reproduce it

 CREATE TABLE tableB (  
tableBid varchar(30) NOT NULL   PRIMARY KEY,
nameB varchar(25) NOT NULL  ,
description varchar(40) NOT NULL);

CREATE TABLE tableA (
userID varchar(30) NOT NULL,
tableBid Varchar(30) NOT NULL,
info varchar(10) NOT NULL,
PRIMARY KEY(userID, tableBID));

insert into tableB (tableBid, nameB, description)
values 
('a', 'a name', 'blah'),
('b', 'b name', 'blah'),
('c', 'c name', 'blah'),
('d', 'd name', 'blah');

insert into tableA (userID, tableBid, info)
values
('deel','a',  'blah'),
('deel','b',  'blah'),
('deel','c',  'blah'),
('deel','d',  'blah');

Then

SELECT  * FROM tableA a
LEFT JOIN tableB b ON b.tableBid = a.tableBid
WHERE a.userID = 'deel';

gives me 4 rows:

deel    a   blah    a   a name  blah
deel    b   blah    b   b name  blah
deel    c   blah    c   c name  blah
deel    d   blah    d   d name  blah

But

SELECT  * FROM tableA a
JOIN tableB b ON b.tableBid = a.tableBid
WHERE a.userID = 'deel';

gives me

deel    d   blah    d   d name  blah

Tables definitions

CREATE TABLE `tablea` (
   `userID` varchar(30) NOT NULL,
   `tableBid` varchar(30) NOT NULL,
   `info` varchar(10) NOT NULL,
   PRIMARY KEY (`userID`,`tableBid`)
 ) ENGINE=Xeround DEFAULT CHARSET=latin1

CREATE TABLE `tableb` (
   `tableBid` varchar(30) NOT NULL,
   `nameB` varchar(25) NOT NULL,
   `description` varchar(40) NOT NULL,
   PRIMARY KEY (`tableBid`)
 ) ENGINE=Xeround DEFAULT CHARSET=latin1
  • 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-18T11:54:35+00:00Added an answer on June 18, 2026 at 11:54 am

    A logical assumption from your queries output: If this happens, it’s a bug.

    After the reveal that you are using the Xeround engine, I think that you should write up the test case you have gathered and submit it as a bug in their bug list or forum.

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

Sidebar

Related Questions

I know there's a lot of other questions out there that deal with this
For some reason, after submitting a string like this Jack’s Spindle from a text
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

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.