I would like to count records in all tables in the

2019-08-13 07:40发布

I try this statement

select schema_name , tabs_name ,
('select count(*) from' || schema_name ||'.'|| tabs_name)
from sysibm.systables
where schema_name = 'Sample'

I would like in the string type can be execute string or must be create procedure or any?

'select count(*) from' || schema_name ||'.'|| tabs_name

Thank you in advance from Thailand

1条回答
相关推荐>>
2楼-- · 2019-08-13 08:36

Try this:

Select TABLE_SCHEMA, TABLE_NAME, NUMBER_ROWS from qsys2.systablestat
Where TABLE_NAME = 'Sample'
查看更多
登录 后发表回答