ものづくりのブログ

うちのネコを題材にしたものづくりができたらいいなと思っていろいろ奮闘してます。

【postgresql】カラム名からテーブルを検索する方法

information_schema.columns テーブルはカラム数が多いので絞って表示します。

select 
  table_name, 
  column_name 
from 
  information_schema.columns 
where 
  column_name ='カラム名';