Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of modifying Field name by mysql

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the method of mysql to modify the field name, the article is very detailed, has a certain reference value, interested friends must read it!

Mysql modifies field names by executing [ALTER TABLE table name CHANGE old field name new field name new data type;] statement to modify the field name.

Mysql modify the field name:

ALTER TABLE table name CHANGE old field name new field name new data type; alter table table1 change column1 column1 varchar (100) DEFAULT 1.2 COMMENT 'comment' -- normal, field name has not changed at this time, field type, type length, default value, comment alter table table1 change column1 column2 decimal (10Magne1) DEFAULT NULL COMMENT 'comment'-- normal, field name, field type, type length, default value, comment alter table table1 change column2 column1 decimal (10Magne1) DEFAULT NULL COMMENT 'comment'-- normal Can modify field name, field type, type length, default value, comment alter table table1 change column1 column2 -- the above is all the contents of mysql's method of modifying field names. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report