Comment on Mysql table

Asked

Viewed 461 times

1

You can insert a comment in the table equal to the comment in a table field?

I need to enter information up to 160 characters in the database tables to help the other devs to have a brief summary of what each of them is about, I know how to do in fields but I did not find anything about the tables.

  • A README.md along with the related files does not serve?

  • I even thought if it is possible as the field of the table, but it is practical as well, but if there is how to do it, I would like to learn.

1 answer

3


You can add a comment in the table by changing it:

ALTER TABLE tabela COMMENT = 'Comentário da tabela';

And you can read the comment with the following query:

SELECT TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tabela';
  • 1

    That’s it, thank you !!! =)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.