嗨!我试图弄清楚如何在同一行代码中的多个步骤中进行连接。这是我到目前为止所得到的,但我收到错误1064。
select * from jbcity
join jbsupplier on jbsupplier.city = jbcity.name where jbcity.state = "Mass"
join jbsupply on jbsupply.supplier = jbsupplier.id
join jbparts on jbparts.id = jbsupply.part;
答案 0 :(得分:2)
试试这个:
select * from jbcity
join jbsupplier on jbsupplier.city = jbcity.name
join jbsupply on jbsupply.supplier = jbsupplier.id
join jbparts on jbparts.id = jbsupply.part where jbcity.state = 'Mass';