How to obtain the total number of records of all tables in the MySQL database using Java _ MySQL
Source: Internet
Author: User
Java to obtain the total number of records of all tables in the MySQL database. bitsCN.com in MySQL, you can use select count (*) FROM table_name to query the number of records in a table. What should I do if I want to know the total number of all other records in a database? This article provides two feasible Java programs to solve this problem.
1. First, determine the number of tables in the database, and then execute select count (*) FROM table_name for each table
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.