Einzelnen Beitrag anzeigen

Benutzerbild von rapante
rapante

Registriert seit: 3. Jun 2009
Ort: OPR
171 Beiträge
 
Delphi XE2 Professional
 
#5

AW: MySQL: Limited Join?

  Alt 10. Dez 2013, 12:51
Ich weiss nicht ob ich deine Anforderung richtig verstanden habe. Wie ist es denn hiermit?:
Code:
SELECT tableA.x,
       (SELECT tableB.y FROM tableB ORDER BY rand() LIMIT 1) AS erg1,
       (SELECT tableB.y FROM tableB ORDER BY rand() LIMIT 1) AS erg2,
       (SELECT tableB.y FROM tableB ORDER BY rand() LIMIT 1) AS erg3,
       (SELECT tableB.y FROM tableB ORDER BY rand() LIMIT 1) AS erg4,
       (SELECT tableB.y FROM tableB ORDER BY rand() LIMIT 1) AS erg5
FROM tableA
  Mit Zitat antworten Zitat