Mysql 显示数据库中具有特殊前缀的表数

Mysql 显示数据库中具有特殊前缀的表数,mysql,Mysql,如何统计MYSQL数据库中以特殊前缀开头的表? 我有以下语法用于显示以前缀开头的表名: SHOW TABLES LIKE 'prefix\_%' 但我不知道如何计算这些表的数量。我认为下面的SQL对您很有用。请更改您的数据库名称和前缀值 SELECT count(table_name) FROM information_schema.tables WHERE table_type = 'base table' AND table_schema='database_name' AND tabl

如何统计MYSQL数据库中以特殊前缀开头的表?
我有以下语法用于显示以前缀开头的表名:

SHOW TABLES LIKE 'prefix\_%'


但我不知道如何计算这些表的数量。

我认为下面的SQL对您很有用。请更改您的数据库名称和前缀值

SELECT count(table_name) FROM information_schema.tables 
WHERE table_type = 'base table' AND table_schema='database_name' AND table_name LIKE "prefix\_%";

谢谢。

我认为下面的SQL对您很有用。请更改您的数据库名称和前缀值

SELECT count(table_name) FROM information_schema.tables 
WHERE table_type = 'base table' AND table_schema='database_name' AND table_name LIKE "prefix\_%";

谢谢。

我认为下面的SQL对您很有用。请更改您的数据库名称和前缀值

SELECT count(table_name) FROM information_schema.tables 
WHERE table_type = 'base table' AND table_schema='database_name' AND table_name LIKE "prefix\_%";

谢谢。

我认为下面的SQL对您很有用。请更改您的数据库名称和前缀值

SELECT count(table_name) FROM information_schema.tables 
WHERE table_type = 'base table' AND table_schema='database_name' AND table_name LIKE "prefix\_%";
多谢各位