Sql Server cross apply和outer apply
with result as( select t.str from( select '1' str union all select '2' str union all select '3' str union all select '4' str union all select '5' str union all select '6' str union all select '7' str ) t cross apply (select t2.str from( select '1' str union all select '2' str union all select '3' str union all select '4' str ) t2 where t.str = t2.str) t3) select * from result; go with result as( select t.str from( select '1' str union all select '2' str union all select '3' str union all select '4' str union all select '5' str union all select '6' str union all select '7' str ) t outer apply (select t2.str from( select '1' str union all select '2' str union all select '3' str union all select '4' str ) t2 where t.str = t2.str) t3) select * from result; go select t.str from( select '1' str union all select '2' str union all select '3' str union all select '4' str union all select '5' str union all select '6' str union all select '7' str ) t cross apply (select t2.str from( select '1' str union all select '2' str union all select '3' str union all select '4' str ) t2 where t.str = t2.str) t3; go
2015年10月-2023年6月 总计7年.
所有总计:7年.
我是唯物唯心二元论的,暂时主学法语.
学习打卡交流QQ群:946556683
所有总计:7年.
我是唯物唯心二元论的,暂时主学法语.
学习打卡交流QQ群:946556683