Mysql 特定表的SQL计数数
我有一个SQL数据库,其中包括几个表(如test1、test2等)。我想计算表名上带有spesific关键字的表的数量。例如,获取以关键字“test”开头的所有表。你知道我该怎么做吗?你可以使用Mysql 特定表的SQL计数数,mysql,sql,sql-server,Mysql,Sql,Sql Server,我有一个SQL数据库,其中包括几个表(如test1、test2等)。我想计算表名上带有spesific关键字的表的数量。例如,获取以关键字“test”开头的所有表。你知道我该怎么做吗?你可以使用信息\u模式。表格: select t.table_name, t.table_schema from information_schema.tables t where t.table_name like 'test%'; 请注意,这在MySQL和SQL Server中都有效
信息\u模式。表格
:
select t.table_name, t.table_schema
from information_schema.tables t
where t.table_name like 'test%';
请注意,这在MySQL和SQL Server中都有效