Altering and Truncating Tables in MySQL

Published October 04, 2026 By Sai Sree Ram Gundepudi

ALTER TABLE

ALTER TABLE employees ADD email VARCHAR(100);

RENAME TABLE

RENAME TABLE employees TO staff;

TRUNCATE TABLE

TRUNCATE TABLE staff; -- Deletes all rows without logging

Use with caution, TRUNCATE is irreversible!

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article