Questione : il mySQL unisce la domanda come scrivo

Posporre 1

webpage_link_id (int), il webpage_id (int), webpage_RSlink1 (int), webpage_RSlink2 (int) il

50,67,1,2


Table2

webpage_id (int), il webpage_name, il webpage_url
1. 1, level1, level1.asp
2. 2, level2, level2.asp

How io scrivono la domanda di sql per ottenere quanto segue:


webpage_link_id, webpage_id, webpage_RSLink1, webpage_name, webpage_url, webpage_RSLink2, webpage_name, webpage_url

50,57,1, level1, level1.asp, 2, level2, level2.asp

Thank you.
class= del

Risposta : il mySQL unisce la domanda come scrivo

prova…
SELEZIONARE a.webpage_link_id, a.webpage_id, a.webpage_RSLink1, b.webpage_name, b.webpage_url, a.webpage_RSLink2, c.webpage_name, c.webpage_url
Da table1 a
UNIRE Table2 b SU a.webpage_RSLink1 = b.webpage_id
UNIRE Table2 c SU a.webpage_RSLink2 = c.webpage_id
Altre soluzioni  
 
programming4us programming4us