I have 3 tables (janitor, security & manager) which inherited from the user table. enter image description here

What is the query can be used to produce the following result(list all the name of the child tables)? enter image description here

Thank you. Cheer :)

  • you want to produce table names which are references of the user table? Jan 24, 2018 at 3:49
  • @EdgarAllanBayron yes :) I hope to produce table names that referencing the user table only.
    – TYL
    Jan 24, 2018 at 3:54

1 Answer 1


Try this:

FROM information_schema.KEY_COLUMN_USAGE
WHERE table_schema = 'database_name'
AND referenced_table_name = 'user';

This will list of referenced tables under table 'user'.


Your Answer

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

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