PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

SQL · Theory

Rename Column

← All stacks

Theory

25/439

Rename Column

MySQL 8: ALTER TABLE students RENAME COLUMN marks TO score; Older: ALTER TABLE students CHANGE marks score INT; CHANGE requires the type again — easy to mistype.

Rename in the app too. ORM field names will break if you only change SQL.

Trap — CHANGE with the wrong type and silently converting data.

On the example next to this theory — Rename Column — aLTER TABLE changes structure without rebuilding the whole table.

Exam tip

ALTER TABLE students RENAME COLUMN marks TO score;

Rename Column — sample query

CREATE TABLE items (id INTEGER PRIMARY KEY, title TEXT);
ALTER TABLE items ADD COLUMN price REAL DEFAULT 0;
INSERT INTO items (id, title, price) VALUES (1, 'Pen', 10);
SELECT * FROM items;

Rename Column — aLTER TABLE changes structure without rebuilding the whole table.

Short notes

  • DefRENAME COLUMN (8+) or CHANGE (older).
  • RuleUpdate application code after a rename.
  • TrapCHANGE with a different type by mistake.

Questions

1

How do you rename a column in MySQL 8?

25 / 439

P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.