Sie können Aggregation verwenden: select up, max(code_dept) as code_dept from ESP_ENSEIGNANT ee group by up;