There’re too many databases,
how can I query which database has a table named aaa to narrow the range to search for?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should look at the
INFORMATION_SCHEMAdatabase for “meta” information such as which databases contain which schemata. For example, to find a list of databases that contain tables with the nameaaa, run this query:SELECT schema_name FROM INFORMATION_SCHEMA.TABLES WHERE table_name = "aaa"For more information on the
INFORMATION_SCHEMA, see the MySQL docs.