错误的写法:
select f.cost, f.id, p.buy_cost from funcs f where f.id = 57 LEFT JOIN paid_vin p on p.func_id = f.id
总是报以下错误:
> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN
> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RIGHT JOIN
正确的写法:
select f.cost, f.id, p.buy_cost from funcs f LEFT JOIN paid_vin p on p.func_id = f.id where f.id = 57