JOINs in MySQL and Other Relational Databases

INNER JOIN (or just JOIN) The most frequently used clause is INNER JOIN. This produces a set of records which match in both the user and course tables, i.e. all users who are enrolled on a course: SELECT user.name, course.name FROM `user` INNER JOIN `course` on user.course = course.id; LEFT JOIN What if we require … Read more