In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "mysql how to view comments", the content of the explanation is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "mysql how to view comments" bar!
Mysql to view comments: 1, use the "SHOW CREATE TABLE table name;" statement to view table comments; 2, use the "SHOW FULL COLUMNS FROM table name;" statement to view field comments.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
To give you a demonstration, here to create a random student table, the code is as follows:
CREATE TABLE `student` (`id` int (11) AUTO_INCREMENT PRIMARY KEY COMMENT 'learn well', `name` varchar (32) NOT NULL DEFAULT''COMMENT' name', `sex`tinyint (1) NOT NULL COMMENT 'gender', `age`tinyint (4) NOT NULL COMMENT 'age', `class`varchar (32) NOT NULL DEFAULT''COMMENT' class') ENGINE=InnODB CHARSET=utf8 COMMENT=' student form'
View comments for the table
The code is as follows:
SHOW CREATE TABLE `student`
Modify the comments of the table
The code is as follows:
ALTER TABLE `student`COMMENT 'Student form 2.0'
The result is shown in the figure:
Modify the comments of the field
The code is as follows:
ALTER TABLE `student`MODIFY COLUMN `id`COMMENT 'student ID'
View comments for a field
The code is as follows:
SHOW FULL COLUMNS FROM `student`
The result is shown in the figure:
Thank you for your reading, the above is the content of "mysql how to view comments", after the study of this article, I believe you have a deeper understanding of how to view comments on mysql, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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
© 2024 shulou.com SLNews company. All rights reserved.