Mysql rename table column Name

I want to rename a column from BonustypeMasid to BonustypeMasCode in blog table

Mytable Script:
CREATE TABLE bonustypedet(
BonustypeMasid int NOT NULL,
FromDOJ datetime NULL,
ToDOJ datetime NULL,
MultipleOf numeric(12, 2) NOT NULL,
LoanDedper numeric(12, 2) NOT NULL
)
Answer 

Try This.

ALTER TABLE bonustypedet change `BonustypeMasid`  `BonustypeMasCode` numeric(12, 2) NOT NULL DEFAULT 0
Result:

Post a Comment

0 Comments