ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Difference between Sub Query and Join in SQL Server<p>Hi&nbsp;EmadKhan,</p> <p>The query you are using is Sub-Query and Join.</p> <p>According to MSDN, in sql server in most cases there is usually no performance difference between queries that uses sub-queries and equivalent queries using joins.&nbsp;</p> <p>But in some cases where existence must be checked, a join produces better performance. Otherwise the nested query must be processed for each result of the outer query. In such cases, a join approach would&nbsp;produce&nbsp;better results.</p> <p>To Check&nbsp;efficient way use <strong>Execution Plan</strong> to see how your database executes the query on your data.</p> <p>In general joins work faster than sub-queries but in reality it all depends on the execution plan that is generated by SQL Server.</p> <p>For more details and performance refer below links.</p> <p><a href="http://csharp-video-tutorials.blogspot.com/2013/01/what-to-choose-for-performance.html">http://csharp-video-tutorials.blogspot.com/2013/01/what-to-choose-for-performance.html</a></p> <p><a href="https://www.c-sharpcorner.com/article/comparison-of-subquery-and-joins/">https://www.c-sharpcorner.com/article/comparison-of-subquery-and-joins/</a></p>https://www.aspforums.net:443/Threads/834413/Difference-between-Sub-Query-and-Join-in-SQL-Server/https://www.aspforums.net:443/Threads/834413/Difference-between-Sub-Query-and-Join-in-SQL-Server/Mon, 29 Jul 2019 01:09:14 GMT