1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
【以下的回答经过翻译处理】 您可以将此视为两个步骤的过程。
- 动态生成用于获取计数的SQL查询。
- 运行SQL查询的输出以生成计数结果。
with tname_vw(i) as (
SELECT concat(
'select ''',
table_name,
''' as table_name, count(*) from ',
table_name
)
FROM information_schema.tables
WHERE table_schema = 'schema_name'
)
select array_join(array_agg(i), ' union ') as result
from tname_vw
Contenus pertinents
- demandé il y a 9 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans