Altering and Truncating Tables in MySQL

Published July 26, 2025 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