例如:select a.* from (select id,code from b left join c on b.id=c.id)a where id=1 这里的where 在执行的时候, where 会优化是否进入到小括号里面执行?????SQL code: select id,code from b left join c on b.id=c.id where id=1
晕你的语句中 id和code要指定是哪个表的。如:b.id c.code: select id,code from b left join c on b.id=c.id where id=1
如: select b.id,c.code from b left join c on b.id=c.id where b.id=1
SQL code: select B.id,B.code from b left join c on b.id=c.id AND B.id=1 SQL code: select B.id,B.code from b left join c on b.id=c.id WHERE B.id=1