Must I use inner join in sql database?

I am trying to select the user from two databases where in the first database, they would have more than a specific number of points and in the second, they would not have subscribed for a particular lesson. Must I use inner join for this because there is no matching columns. I have a database called rewards that have only points system and memberships to display which membership the user has but no reward points in it. Should I include the reward points in the memberships as well to make it easier?

Are you selecting from two databases or two tables?

If you want to combine the data of two tables, you will either need to use:

  • Joins.
  • Subqueries.
  • Query both tables and stitch the data together in your code.

Sometimes, denormalizing data (duplicating it in multiple tables) can be beneficial for performance and ease of querying, but does risk data getting out of sync. So use it with caution.

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