Mysql如何刪除數(shù)據(jù)庫表中的某一列
更新時間:2022年06月22日 11:28:29 作者:小小平不平凡
這篇文章主要介紹了Mysql如何刪除數(shù)據(jù)庫表中的某一列,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
刪除數(shù)據(jù)庫表中的某一列
刪除某一字段的值
update table_name SET field_name = '';
刪除某一列
ALTER TABLE table_name DROP COLUMN field_name;
Mysql刪除列,添加列的sql語句
已有表actor,且包含列l(wèi)ast_name
-- 刪除列, 以下兩種方式都可以 alter table actor drop ?column last_name; alter table actor drop last_name;
-- 添加列,必須指定列的類型 alter table actor add last_name varchar(10);
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
Mysql數(shù)據(jù)庫表定期備份的實現(xiàn)詳解
這篇文章主要介紹了Mysql數(shù)據(jù)庫表定期備份的實現(xiàn)詳解的相關(guān)資料,需要的朋友可以參考下2017-03-03

