31
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MySQLですべてのテーブルのすべてのカラムの一覧を取得する

Posted at

データベース内のテーブルとそのカラムの一覧がほしい!と思いました.

information_schema にいろんな情報が含まれているよ〜というアドバイスをもらったので調べたらこんな感じで取得できました.

SELECT
	table_name,
	column_name,
	data_type
FROM
	information_schema.columns;
31
27
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
31
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?