Which one is better SQL Joins or sub query in case of multiple table?

i have a html form that having a lot of stored in multiple table. At the time of getting the complete form data from the multiple table which option is better for the better performance sub query or joins.

My gut feeling would be to use JOINs and a single query if you can, allow the SQL server to optimise.

1 Like

In a general sense with MySQL joins would be preferred. However, there are things you can accomplish with subqueries which you can’t with joins alone.

1 Like

From my understanding, I would default to using JOINs until reaching a point where I would need to use subqueries.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.