地址:https://blog.youkuaiyun.com/u012571917/article/details/79816988
select * from person.StateProvince where CountryRegionCode in
(select CountryRegionCode from person.CountryRegion where Name like ‘C%’)
=================相当于
with
cr as
(
select CountryRegionCode from person.CountryRegion where Name like ‘C%’
)
select * from person.StateProvince where CountryRegionCode in (select * from cr)
SQL查询技巧
本文介绍了一种使用SQL进行复杂查询的方法,通过将两个不同表之间的连接转换为子查询的方式,简化了查询过程并提高了效率。
644

被折叠的 条评论
为什么被折叠?



