Hallo Rouven,
SELECT DISTINCT Produkt,Farbe FORM tabelle WHERE Farbe='rot' OR Farbe='grün'
Diese Abfrage bringt dir jetzt vermutlich immer noch das Ergebnis
1 | rot
1 | grün
2 | rot
oder so.
stimmt, du hast recht - allerdings habe ich in dem Query noch einen Verdreher eingebaut: es muss natürlich FROM statt FORM heißen :-)
SELECT DISTINCT Produkt FROM tabelle WHERE Farbe='rot' OR Farbe = 'grün'
SELECT DISTINCT Produkt FROM tabelle WHERE Farbe IN ('rot', 'grün')
die funktionieren beide (habs getestet :-))
Grüße aus Nürnberg
Tobias
--
Selfcode: sh:( fo:) ch:? rl:( br:< n4:& ie:% mo:| va:) de:] zu:) fl:( ss:| ls:[ js:|
Selfcode: sh:( fo:) ch:? rl:( br:< n4:& ie:% mo:| va:) de:] zu:) fl:( ss:| ls:[ js:|