MYSQL操作フィールド
464 ワード
1.フィールドを追加
2.フィールドの削除
3.フィールドの変更フィールドのタイプを変更する フィールド名を変更するには、そのフィールドのタイプ を再指定する必要があります.
alter table user add column user_name varchar(20) not null default 'admin' comment ' ';
2.フィールドの削除
alter table user drop column user_name;
3.フィールドの変更
alter table user modify user_name varchar(10);
alter table user change user_name other_name int;