MYSQL Search for Table or Column names in a Database

mysql logo
You may remember that about three weeks ago I posted a handy script to search for the names of Tables and Columns in a Microsoft SQL database.
Well now today it’s the turn of MySql.
Just a nice and simple script as before however this time there are two seperate scripts one for tables and one for columns names.
– Author : Martin Hall
– Date 09th April 2010
– Search Table or Column for text
– MYSQL Version
– Top query for Table Names and bottom query for column names
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME like ‘%users%’
Order by table_name asc;
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE Column_NAME like ‘%video%’
Order by column_name asc;
Enjoy.
Martin H