View Single Post

   
  #4 (permalink)  
Old 02-28-2008, 09:08 AM
christoph lauterbach
 
Posts: n/a
Default Re: Returning values which don't match values in table

Okay, this evening I mastered to implement Pauls solution. The correct
query reads as follows:
SELECT `q`.`country_code`
FROM (
SELECT 'de' AS `country_code`
UNION
SELECT 'it' AS `country_code`
UNION
SELECT 'es' AS `country_code`
UNION
SELECT 'pl' AS `country_code`
UNION
SELECT 'cz' AS `country_code`
UNION
SELECT 'us' AS `country_code`
) AS `q`
LEFT JOIN `country_code_table` USING(`country_code`)
WHERE `country_code_table`.`country_code` is NULL

Regards
Christoph

Reply With Quote