Is there a way in PhpMyAdmin to do a SQL search for all tables, that have a fieldname username in it?

I am trying to help a friend that has a database with over 1,000 tables in it.

He needs to find all of them that have username as a field name, so he can find the list of tables and not have to manually look at each table.

I don't know MySQL enough to do it.

Anyone know where to find the way?


1 Answer 1


I found it...

SELECT table_name, column_name, data_type, ordinal_position 
WHERE table_schema = 'dbname' AND column_name LIKE '%username%';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.