elarichi.y elarichi.y - 6 months ago 38
MySQL Question

Views related to a mysql table

How can I get all the views related to a table?
I want to alter that table but don't know which views use it in their select query.


Untested, but I think this might work.

The INFORMATION SCHEMA holds the metadata of your databases, including (among many other things), information about views.

So something like this might be useful:

select *
from information_sechema.views
where view_definition like '%yourTableName%'