我有 64 个结构相同的表。我需要在每个表中找到行数,但我不想单独查询每一个,所以我认为 create View 显然是......
CREATE VIEW globalResults AS
SELECT 'France' as country, count(RC) as complete FROM tableName1 where RC=18
UNION
SELECT 'UK' as country, count(RC) as complete FROM tableName2 where RC=18
UNION
SELECT 'Italy' as country, count(RC) as complete FROM tableName3 where RC=18
UNION
etc...
有没有更好的解决方案如何创建 VIEW?