2
sql
-- View the students table
SELECT * FROM students;
-- View the enrollments table
SELECT * FROM enrollments;
-- Return student names along with their enrolled class
SELECT students.name, enrollments.class_name
FROM students
INNER JOIN enrollments
ON students.student_id = enrollments.student_id;
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.