我有以下声明:
select region_id from regions
where region_name = 'Europe'
我需要以下语句中“ bla”为以下内容的输出:
select count(*) from countries
where region_id = 'bla'
我怎样才能做到这一点?
最佳答案
select distinct * from countries
where region_id IN (select region_id from regions
where region_name = 'Europe')