How to Change a Column Type in MySQL
Last updated July 24, 2026 · By the SaturnSQL team
Use ALTER TABLE ... MODIFY with the new full definition. MODIFY keeps the name; CHANGE renames and retypes at once. On big tables this rewrites the table, so plan for the lock time.
ALTER TABLE orders MODIFY amount DECIMAL(12,2) NOT NULL;Rename and retype together
ALTER TABLE orders CHANGE amount order_amount DECIMAL(12,2) NOT NULL;Values that don't fit the new type make the ALTER fail in strict mode. Check first with a cast: SELECT * FROM orders WHERE CAST(amount AS DECIMAL(12,2)) IS NULL AND amount IS NOT NULL.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free