Tuesday, 8 July 2014

HOW DO I CHANGE THE DATA TYPE FOR COLUNM IN MySQL

Query to change data type in MySQL table:

ALTER TABLE TABLENAME MODIFY COLUMNNAME double;

Example using this query:

ALTER TABLE transaction MODIFY receivedamount double;

Here:

TABLENAME = TRANSACTION
COLUMNNAME = RECEIVEDAMOUNT
DATATYPE = DOUBLE

No comments:

Post a Comment