0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PostgreSQL:特定カラムを持つテーブル一覧を取得するSQL

Posted at

目次

はじめに

PostgreSQLでカラム名に特定のワードを含むテーブルの一覧を調査する機会があったので備忘代わりにSQLを残します。

対象

  • PostgreSQLで特定カラムを持つテーブルを取得したい人

環境

  • PostgreSQL

手順

PostgreSQLに接続して以下のSQLを実行する。

SQL説明

  • 取得項目:テーブル名、カラム名
  • 取得条件:カラム名にcolumn_nameを含む
list.sql
select
  table_name,
  column_name
from
  information_schema.columns
where
  column_name LIKE '%column_name%';
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?