16
13

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

書き方

テーブルのコメントは、CREATE文の最後にcomment='table comment'という形。
カラムの場合は、columnName int comment 'column comment'となる。

CREATE TABLE tableName (
    columnName1 int comment '1つ目のカラム',
    columnName2 text comment '2つ目のカラム'
)
default charset=utf8
comment='テーブルに対するコメント';
16
13
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
16
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?