LeetCode 1350: Students With Invalid Departments [SQL]

preview_player
Показать описание
Solution and walkthrough of leetcode database problem 1350: Students With Invalid Departments. I'm using MySQL but this solution should work in any SQL dialect such as PostgreSQL, SQL Server, etc.

Playlists:

Рекомендации по теме
Комментарии
Автор

Since morning I've been watching you videos. Keep up the good work and soon you'll blow up....Thank you for all the efforts. Love from India.

shubham
Автор

select id, name from Students where department_id NOT IN (select id from Departments)

BluEN
Автор

can we simply use students.department_id != Departments.id

pareshpal
Автор

dumb question : i wanted to use students.department_id <> departments.id, why is it wrong ?

irislynn