Table departments, columns = [DepartmentId, DepartmentName] Table students, columns = [DepartmentId, StudentId, StudentName] get all students in the Computer Science Department in SQL
SQL
4
SELECT students.StudentId, students.StudentName
FROM students
INNER JOIN departments ON students.DepartmentId = departments.DepartmentId
WHERE departments.DepartmentName = 'Computer Science'
🤖 Code Explanation
This code written in SQL returns all of the students in the "Computer Science" department along with their StudentId and StudentName.