Cette requête devrait aussi faire le job, je pense : SELECT IF(COUNT(*) > 0, macolonne2, 'ABC') FROM ma_table WHERE macolonne1 = 123 AND macolonne2 IS NOT NULL LIMIT 1 Bonne journée Le mercredi 25 mai 2022 à 08:49 +0200, Olivier a écrit : Voici la réponse de Dethegeek:CREATE TABLE `ma_table` (`id` INT(10) NOT NULL,`macolonne1` INT(10) NOT NULL,`macolonne2` VARCHAR(50) NULL DEFAULT NULLPRIMARY KEY (`id`));SELECTif ((SELECTCOUNT(*)FROMma_tableWHEREmacolonne1 = 123AND NOT ISNULL(macolonne2)) = 0,'ABC',(selectmacolonne2fromma_tablewheremacolonne1 = 123and not isnull(macolonne2))) |