How to Change Column Definition in MySQL


How to redefine a column in MySQL:
- redefining a column means changing the definition of a column (i.e. changing name, data type, size, null, default value etc.)
- To redefine a column; we take help of alter table command

Basic Syntax:
alter table tablename change original_column_name new_column_name datatype(size)
[ not null default value ];

alter table tbl_student change id rollnum float(10,2) not null default 0.00;

Interview Questions: