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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:42:37+00:00 2026-05-16T12:42:37+00:00

I am running 2 queries against an Informix database. The queries are hitting 4

  • 0

I am running 2 queries against an Informix database. The queries are hitting 4 different tables with both inner and outer joins. I thought they should both return the same result set, but I am getting a 3 record difference. The two queries are shown below:

query 1 (returns 65 rows) –

 select ...  
    from table1, table2, outer table3, outer table4
   where table1.id = table2.id
     and table1.id = table3.id
     and table1.id = table4.id 
     and .....

query 2 (returns 62 rows) –

select ....
from table1 inner join table2 on table1.id = table2.id
left outer join table3 on table1.id = table3.id
left outer join table4 on table1.id = table4.id
where .....

Does anyone have any idea why these 2 return different result sets? I assumed that by changing to use inner join / left outer join instead of just using outer (and nothing for the inner join) would return the same results.

  • 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-16T12:42:38+00:00Added an answer on May 16, 2026 at 12:42 pm

    The contents of the WHERE clauses are probably a factor in this. The first notation, the Informix-style OUTER join notation, is non-standard, and has rather peculiar semantics (that’s being polite). The second notation is the ISO standard OUTER JOIN which has prescribed semantics.

    With the Informix-style join, all the rows from the inner-joined pair of tables that survive any filters in the WHERE clause that are on their columns only will be returned in the result set. If there are filters in the WHERE clause on columns in the outer-joined tables, or between the inner tables and the outer tables, then those filters may eliminate some possible rows from the result set, but the innner-joined part of the result will still appear extended with nulls. It is excruciatingly complex to explain. It sort of more or less makes sense, but the result isn’t simply a projection of a restriction of the basic set of joins.

    Can you confirm that the WHERE clauses contain some conditions on columns in table3 and table4?

    There isn’t a trivial way to simulate the Informix-style OUTER join with ISO standard OUTER JOIN notation.

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

Sidebar

Related Questions

i'm going to running some queries against an SQL Server database, followed by a
I am running the following queries against a database: CREATE TEMPORARY TABLE med_error_third_party_tmp SELECT
I am running queries against an Oracle 10g with JDBC (using the latest drivers
I'm running a number of CAML queries against a large list in SharePoint 2010,
I am running some queries to track down a problem with our backup logs
When running command-line queries in MySQL you can optionally use ' \G ' as
I'm going to running thousands of queries into SQL and I need to prevent
Scenario: I need to pull information out of a Visual FoxPro database; however, running
I have 5 databases which represent different regions of the country. In each database,
I have a web service (JAX-RS/Spring) that generates SQL queries which run against a

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.