Hello,
1 Peter M Stuttgart
3 Udo W Frankfurt
- Karl - -
jein. Zunächst einmal, du suchst keinen INNER JOIN sondern eher einen LEFT JOIN ("wenn vorhanden, dann füge hinzu").
Was ich allerdings als problematisch ansehe: der Name steht in der Nutzertabelle. Du kannst also ohne gültigen Eintrag dort niemals einen sinnvollen Join ausführen, weil der Name leer bleiben wird. Dein Beispiel mischt bei FreundID die wirklichen IDs und Namen. Das ist eine relativ ungültige Konstruktion.
Da würde ich eher "virtuelle Freunde" anlegen, bei denen noch Informationen fehlen und diese dann in die Tabelle eintragen.
MfG
Rouven
--
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve