In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail about mysql to add comments to the table method, Xiaobian think it is very practical, so share it for everyone to make a reference, I hope you can read this article after harvest.
mysql How to add comments to a table: You can use the comment keyword to add comments. For example, create user table (in int, name varchar(30))comment = 'user information table';].
In MySQL, add comments to tables and fields using the COMMENT keyword.
1. Add comments to tables and fields
Add comments to tables and fields as you create data tables.
CREATE TABLE tb_user( id INT AUTO_INCREMENT PRIMARY KEY COMMENT 'number', name VARCHAR(30) COMMENT 'name') COMMENT = ' user information table';
2. Modify table notes
ALTER TABLE tb_user COMMENT 'user information table2';
3. Modify field comments
To modify a field comment is to modify the field definition.
ALTER TABLE tb_user MODIFY COLUMN name VARCHAR(30) NOT NULL COMMENT 'Last name 2';
Note: When modifying, complete definition of the field should be written, such as field type, attribute, etc. Never modify a comment by overwriting other attributes defined by that field.
4. Query field information
SHOW FULL COLUMNS FROM tb_user; About mysql to add comments to the table method shared here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
#! / bin/bashecho-e "\ n\ n*~~DATE:" `date'+% Y/%m/%d% T'` "~
© 2024 shulou.com SLNews company. All rights reserved.