Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个返回广告商列表的查询,每个广告商都有几个品牌附加到它上面。
所以我正在运行这个:
select distinct Name from tblAdvertiser inner join tblAvertiserBrand on AdvertiserID=ID
所以这将返回一个广告商列表,我正在尝试编写一个查询,该查询将为上面查询将以自动方式给出的列表的每一行循环,有什么想法吗?
默认情况下 SQL '循环'
SELECT * FROM TABLE WHERE advertiser_name IN (SELECT DISTINCT Name FROM tblAdvertiser INNER JOIN tblAvertiserBrand ON AdvertiserID=ID)