SELECt DISTINCT idFROM tableWHERe id NOT IN (SELECt id FROM table WHERe val = 'current')
或者:
SELECt a.idFROM table aLEFT JOIN table b ON a.id = b.id AND b.val = 'current'WHERe b.id IS NULL

SELECt DISTINCT idFROM tableWHERe id NOT IN (SELECt id FROM table WHERe val = 'current')
或者:
SELECt a.idFROM table aLEFT JOIN table b ON a.id = b.id AND b.val = 'current'WHERe b.id IS NULL