Select multiple ranges in a WHERE clause
BETWEEN is a nice method to help define ranges.

SELECT boroid
FROM districts
WHERE boroid BETWEEN 101 AND 108
  OR boroid BETWEEN 301 AND 303
  OR boroid = 402;