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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:43:55+00:00 2026-05-26T23:43:55+00:00

I was wondering about the difference : select * from Table1 T1 left join

  • 0

I was wondering about the difference :

select * 
from Table1 T1 
left join Table1 T2 on T1.id = T2.id + 1 and (T2.id > 3) 

vs

select * 
from Table1 T1 
left join Table1 T2 on T1.id = T2.id + 1 
where (T2.id > 3)
  • 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-26T23:43:56+00:00Added an answer on May 26, 2026 at 11:43 pm

    There is a significant difference.

    select * from Table1 T1 left join  Table1 T2 on T1.id=T2.id+1     where    (T2>3 
    

    The where clause is changing the left join to an inner join, since it is not allowing for the null value to be returned from the left join. This means all the rows where the left join doesnt find a matching record would be excluded, since the null value returned is compared to 3 and it discards the row (this is the same effect as making it an inner join)

    The first statement is applying the filter within the join:

    select * from Table1 T1 left join  Table1 T2 on T1.id=T2.id+1     and     (T2>3)  
    

    This means it will take effect and filter the rows that can be joined to using the left join, but this will not cause rows to be discarded when the left join fails to find a matching row.

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

Sidebar

Related Questions

I was wondering about the performance difference between these two scenarios and what could
I am wondering about performance difference between stored procedure and scalar-valued function. For now
I was wondering about the wizard of eclipse, what the difference was between the
I'm wondering about the difference between what is defined by the several standards of
Just wondering about this one : Whats the difference, or is there a difference
I am wondering about the difference between superView and parentView. view.parentView view.superView Do the
I'm wondering about if there is a difference (in performance) when I use: User
I was wondering about the difference between using a Control’s Hide() method compared to
I was wondering about the different ways of using a JQuery function on a
I was wondering about the pros and cons on the different Blackberry development environments.

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.