Re: Count Table rows using Stored Procedure
> 1- Read a list of tables (e.g. 10)
If it's all the tables of a schema, or if table names follow a string pattern, simplest to use information_schema eg...
select table_name, table_rows
from information_schema.tables
where table_schema='my_schema' and table_name like 'my_%';
Otherwise you could use a comma-separated string of table names with an IN() clause in the above query.
By "print" the result you mean send it to the printer, or display it? If the former, you need to SELECT the result in MySQL, then use the printing capabilities of the OS where your mysql client is running. If the latter, just SELECT it.
Edited 1 time(s). Last edit at 02/09/2018 10:50AM by Peter Brawley.
Subject
Views
Written By
Posted
10297
February 08, 2018 11:01AM
Re: Count Table rows using Stored Procedure
1696
February 08, 2018 01:11PM
1133
February 09, 2018 03:52AM
912
February 09, 2018 10:59AM
948
February 12, 2018 09:13AM
942
February 12, 2018 11:08AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.