There are too many tables in a db. how can I only show tables with certain patterns? Or is there a way I can do paging like "| more" in shell command?
How to list all tables that contain a specific column name in MySQL? You want to look for tables using the name of columns in them. SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA. COLUMNS WHERE COLUMN_NAME IN('column1', 'column2') AND TABLE_SCHEMA = 'schema_name';
To get a list of the tables in a MySQL database, use the mysql client tool to connect to the MySQL server and run the SHOW TABLES command. The optional FULL modifier will show the table type as a second output column.
show tables like 'pattern';
for example:
show tables like 'test%' will filter tables such as "test1,testF,test111,testFoo"
show tables like 'test_' will filter tables such as "test1,testF"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With