当前位置:网站首页>How MySQL deletes a column in a database table

How MySQL deletes a column in a database table

2022-06-22 18:57:00 1024 Q

Catalog

Delete a column in the database table

Mysql Delete column , Add columns sql sentence

Delete a column in the database table

Delete the value of a field

update table_name SET field_name = '';

Delete a column

ALTER TABLE table_name DROP COLUMN field_name;Mysql Delete column , Add columns sql sentence

There is a watch actor, And contains columns last_name

-- Delete column , Either way alter table actor drop  column last_name;alter table actor drop last_name;-- Add columns , You must specify the type of column alter table actor add last_name varchar(10);

The above is personal experience , I hope I can give you a reference , I also hope you can support the software development network .


原网站

版权声明
本文为[1024 Q]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221706020048.html