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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:38:01+00:00 2026-06-15T14:38:01+00:00

I am using SQL Server 2008. Whats is the difference between : With conditions

  • 0

I am using SQL Server 2008.

Whats is the difference between :

With conditions in the Where clause

select customer.Id,
       order.Id
  from Customer customer
      left outer join Order order on order.customerId = customer.Id
  where 
      order.deleted =0

With conditions on the ON clause

select customer.Id,
       order.Id
  from Customer customer
      left outer join Order order 
           on order.customerId = customer.Id 
           and order.deleted =0

And how do the two compare with

select customer.Id,
       order.Id
  from Customer customer
      inner join Order order on order.customerId = customer.Id
  where 
      order.deleted =0
  • 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-15T14:38:02+00:00Added an answer on June 15, 2026 at 2:38 pm

    I think you should learn about sql joins. Here is a nice link to start.

    Basically,

    • Case 1: You are filtering order.deleted =0 which could be null as it
      is the right table of a left join.If right table does not have a mapping row, columns from that table will be null. It should be as ISNULL(order.deleted,0)=0 Or order.delete IS NULL or order.delete=0

    • Case 2: ON is the condition where the two tables are joining and
      condition order.deleted =0 is checked (I think) before the join

    • Case 3: Simple JOIN or INNER JOIN where exact rows are mapped from both sides

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

Sidebar

Related Questions

I am using SQL Server 2008. What is the difference between (local) and (pc-name)\SQLEXPRESS
Using SQL Server 2008 R2 we are looking for a way to select the
What is the difference between Implicit and Explicit transaction in Sql Server 2008? What
I using Microsoft SQL Server 2008 to try and identify the chronological order of
If I am using .Net and SQL Server 2008, what is the best way
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; What I'm ultimately trying to do is update a sql
Using SQL Server 2008. I have multiple Locations which each contain multiple Departments which
Using SQL Server 2008, is there a way to allow inserts to a table
using : SQL Server 2008 R2, Entityframework 4.3.1 my scenario : I read my
I am using SQL Server 2008 R2, I have a script to update the

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.