这个SQL还能优化吗?
select b.name ,a.code
from table1 a,table2 b,table3 c
where a.name=b.name and c.id=a.id and a.id = 123;
------解决方案--------------------
select b.name ,a.code
from table1 a,table2 b,table3 c
where a.name=b.name and c.id=a.id and a.id = 123;
可以修改成这样,比你现在的语句好些
select b.name ,a.code
from table1 a
inner join table2 b on a.name = b.name
inner join table3 c on c.id = a.id
where a.id = 123;