Можете да използвате DISTINCT
:
SELECT DISTINCT studid FROM registration WHERE courseid IN ('100', 101');
или GROUP BY
:
SELECT studid FROM registration WHERE courseid IN ('100', '101') GROUP BY studid;
Можете да използвате DISTINCT
:
SELECT DISTINCT studid FROM registration WHERE courseid IN ('100', 101');
или GROUP BY
:
SELECT studid FROM registration WHERE courseid IN ('100', '101') GROUP BY studid;