How do I change the data type for a column in MySQL(Modify columns)?

Syntax:

ALTER TABLE tablename MODIFY columnname numeric(18,2);
or
ALTER TABLE [tablename] CHANGE [columnName] [columnName] numeric(18,2)
Examples:
Alter table bonustypedet modify BonustypeMasid int DEFAULT 0;
ALTER TABLE bonustypedet modify LoanDedper numeric(12, 2) NOT NULL DEFAULT 0

Post a Comment

0 Comments