Interviews - C# Corner

Mohd Kashif
What is good option to use in SQL and WHY? 1) JOIN 2) SUB QUERY
By Mohd Kashif in SQL onSep 26 2019
    Oct, 2019 22

    Usually joins will work faster than inner queries, but in reality it will depend on the execution plan generated by SQL Server. No matter how you write your query, SQL Server will always transform it on an execution plan. If it is “smart” enough to generate the same plan from both queries, you will get the same result.
    In more complex queries, I find joins much easier to read than sub-queries. sub-queries turn into a bowl of noodles in my head.

    • 1
  • Nakul Chaudhari
    Oct, 2019 9
  • Tushar Dikshit
    Oct, 2019 8

    JOIN is better option. Faster than subquery.

    • 0

Most Popular Companies

Most Popular Job Functions