MySql

[Mysql] 컬럼 추가, 삭제, 이름변경, 타입 수정

hwijin97 2021. 9. 8. 15:35

컬럼 추가

alter table `table` add `col_name` type ...;

컬럼 삭제

alter table `table` drop column `col_name`;

컬럼 이름 변경

alter table `table` change `old_name` `new_name` type ...;

컬럼 타입 수정

alter table `table` modify `col` new_type ...;