Hello,
und weitere Felder kann ich einfach mit , dazwischenklemmen?
ahhhh - VORSICHT! NEIN! Genau das sollst du NUR DANN tun, wenn du die Felder entweder in der GROUP BY-Klausel hast, oder sie von einer Aggregatsfunktion begleitet werden. Du solltest nie nie nie nie nie folgendes machen:
SELECT usbstick, beschreibung, AVG(preis), AVG(groesse)
FROM usb
GROUP BY usbstick
NIcht-MySQL-Datenbanken hauen dir das Statement (IMHO korrekterweise) um die Ohren. MySQL hat eine (IMHO gefährliche) Sonderlocke, die das trotzdem durchlässt, vgl. verdeckte Felder
MfG
Rouven
--
-------------------
sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
We found ourselves looking upon a familiar sight. We were home. How do you pick up the threads of an old life? How do you go on... when in your heart you begin to understand... there is no going back? There are somethings that time cannot mend... some hurts that go too deep... that have taken hold. -- The Lord of the Rings: The Return of the King (Peter Jackson)
-------------------
sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
We found ourselves looking upon a familiar sight. We were home. How do you pick up the threads of an old life? How do you go on... when in your heart you begin to understand... there is no going back? There are somethings that time cannot mend... some hurts that go too deep... that have taken hold. -- The Lord of the Rings: The Return of the King (Peter Jackson)