sqlserver的left join 语句怎么用with as来优化?还有就是什么时候用outer apply 这种写法?
0
select c.*
from (
select *
from A
left join B on bj.bj_id=hj.hj_bj_id) c
left join D on d.id=c.id
这个sql语句怎么用with as优化呢?
from (
select *
from A
left join B on bj.bj_id=hj.hj_bj_id) c
left join D on d.id=c.id
这个sql语句怎么用with as优化呢?
没有找到相关结果
重要提示:提问者不能发表回复,可以通过评论与回答者沟通,沟通后可以通过编辑功能完善问题描述,以便后续其他人能够更容易理解问题.
2 个回复
xiaoyaya 2014-10-26 回答
赞同来自:
superboyli520 - 微软BI技术达人 2014-10-26 回答
赞同来自:
(
select *
from A
left join B on bj.bj_id=hj.hj_bj_id
)
select c.* from c left join D on d.id=c.id
不知道你是不是想问这种写法。
但with as其实并没有优化成分,只不过,让逻辑看的更清楚了!