Bạn có thể sử dụng DISTINCT
:
SELECT DISTINCT studid FROM registration WHERE courseid IN ('100', 101');
hoặc GROUP BY
:
SELECT studid FROM registration WHERE courseid IN ('100', '101') GROUP BY studid;
Bạn có thể sử dụng DISTINCT
:
SELECT DISTINCT studid FROM registration WHERE courseid IN ('100', 101');
hoặc GROUP BY
:
SELECT studid FROM registration WHERE courseid IN ('100', '101') GROUP BY studid;