テーブルのカラム名取得
select table_schema , table_name, column_name , column_comment from information_schema.columns where column_name like '%shohin_id%' ### 探したい項目名称を指定 and table_schema like '%DB%'; ### 探したいDB範囲を指定
上記の実行結果例
![テーブルカラム名取得する方法](https://apl-py.com/blog/wp-content/uploads/2016/01/caf38f1006ee4dede46b782e5d45c45a.jpg)
この通り、column_nameにshohin_idを持っているテーブルを全て洗い出せる。