表A:分类ID,分类名
表B:产品ID,分类ID,产品名
要求取 所有产品以及分类名
select
[
产品名
]
,(
select
[
A.分类名
]
from
[
A
]
where
[
A.分类ID
]
=
[
B.分类ID
]
)
as
[
分类名
]
from
[
B
]