您可以对显示表使用LIKE运算符,以显示具有特定模式的表。LIKE用于设置图案。
语法如下-
SHOW TABLES LIKE ‘yourPattern’;
我们已经进行了数据库测试,并且有一些带有字母d的表。因此,我们正在考虑的模式是d。
现在实现上述语法以在SHOW TABLES中显示具有某些模式的表。查询如下。
mysql> show tables like '%d_';
以下是输出。
+----------------------+ | Tables_in_test (%d_) | +----------------------+ | differenceinseconds | | lasthourrecords | | skiplasttenrecords | +----------------------+ 3 rows in set (0.04 sec)