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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:28:23+00:00 2026-06-08T18:28:23+00:00

What the difference between writing a join using 2 from clauses and a where

  • 0

What the difference between writing a join using 2 from clauses and a where like this:

var SomeQuery = from a in MyDC.Table1
                from b in MyDC.Table2
                where a.SomeCol1 == SomeParameter && a.SomeCol2 === b.SomeCol1

and writing a join using the join operator.

This is for a join on 2 tables but of course, sometimes, we need to join even more tables and we need to combine other from clauses with where if we choose the syntax above.

I know both syntax queries return the same data but I was wondering if there’s a performance difference, or another kind of difference, that would conclusively favor one syntax over the other.

Thanks for your suggestions.

  • 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-08T18:28:24+00:00Added an answer on June 8, 2026 at 6:28 pm

    This question is actually answered pretty good in these two.

    INNER JOIN ON vs WHERE clause

    INNER JOIN vs multiple table names in "FROM"

    I’ve included two examples on how three different LINQ expressions will be translated into SQL.

    Implicit join:

    from prod in Articles
    from kat in MainGroups
    where kat.MainGroupNo == prod.MainGroupNo
    select new { kat.Name, prod.ArticleNo }
    

    Will be translated into

    SELECT [t1].[Name], [t0].[ArticleNo]
    FROM [dbo].[Article] AS [t0], [dbo].[MainGroup] AS [t1]
    WHERE [t1].[MainGroupNo] = [t0].[MainGroupNo]
    

    Inner join:

    from prod in Articles
    join kat in MainGroups on prod.MainGroupNo equals kat.MainGroupNo
    select new { kat.Name, prod.ArticleNo }
    

    Will be translated into

    SELECT [t1].[Name], [t0].[ArticleNo]
    FROM [dbo].[Article] AS [t0]
    INNER JOIN [dbo].[MainGroup] AS [t1] ON [t0].[MainGroupNo] = [t1].[MainGroupNo]
    

    Left outer join:

    from prod in Articles
    join g1 in MainGroups on prod.MainGroupNo equals g1.MainGroupNo into prodGroup
    from kat in prodGroup.DefaultIfEmpty()
    select new { kat.Name, prod.ArticleNo }
    

    Will be translated into

    SELECT [t1].[Name] AS [Name], [t0].[ArticleNo]
    FROM [dbo].[Article] AS [t0]
    LEFT OUTER JOIN [dbo].[MainGroup] AS [t1] ON [t0].[MainGroupNo] = [t1].[MainGroupNo]
    

    If you want to test how your expressions will be translated into SQL, I recommend that you try LINQPad. It’s an awesome tool for figuring out this kind of stuff.

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

Sidebar

Related Questions

Is there a difference between writing something like this: MailboxProcessor.Start(fun inbox -> async {
Possible Duplicate: Difference between using var and not using var in JavaScript Hello, I
I am writing an application and using MySQL to return the difference between 2
Study guide question: I have no idea what the difference is between writing it
Is there any semantic difference between writing assertThat(object1, is(equalTo(object2))); and writing assertThat(object1, equalTo(object2))); ?
When writing C++ code is there any difference between: #include <cstdlib> and #include <stdlib.h>
Is there an appreciable performance difference between having one SELECT foo, bar, FROM users
I'm writing in Visual Studio 2008 using C# (if that makes a difference) and
What is the difference between writing a unit test in the same class as
Possible Duplicate: Difference between .Net4 Client Profile and Full Framework download I am writing

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.