What is good option to use in SQL and WHY? 1) JOIN 2) SUB QUERY
Mohd Kashif
Select an image from your device to upload
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.
https://blog.sqlauthority.com/2010/06/06/sql-server-subquery-or-join-various-options-sql-server-engine-knows-the-best/