About this question
What is the correct way to rename a column in a database table using SQL, and how does the syntax differ across databases? This guide covers the SQL commands and examples you can use to rename columns safely and effectively.
What is the correct way to rename a column in a database table using SQL, and how does the syntax differ across databases? This guide covers the SQL commands and examples you can use to rename columns safely and effectively.
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask MS SQL Server Expert
Answered on Sep 16, 2025
Renaming a column in a database table using SQL is a straightforward task, but the exact syntax can vary depending on the database system you are using. Changing column names is often necessary when you want your schema to be more descriptive, readable, or aligned with new business requirements.
In MySQL, you can use the ALTER TABLE command with the CHANGE keyword. However, you must also specify the column’s data type when renaming:
ALTER TABLE employees
CHANGE COLUMN old_name new_name VARCHAR(100);In PostgreSQL and Oracle, the syntax is simpler with the RENAME COLUMN clause:
ALTER TABLE employees
RENAME COLUMN old_name TO new_name;In SQL Server, you use the stored procedure sp_rename:
EXEC sp_rename 'employees.old_name', 'new_name', 'COLUMN';Key points to remember:
By knowing the correct syntax for your SQL database, you can safely rename columns and keep your database schema consistent, organized, and easier to understand.
Ezrani Latest answer
Answered on Mar 17, 2026
I love how straightforward the SQL examples are! I once had to rename a column in a large database, sorry bob and following clear syntax like what you shared saved me tons of time. Great resource for both newbies and pros!
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step SQL Server guides from industry experts
Common SQL Server interview questions, answered
Guides, tips and career advice on SQL Server from JanBask experts.
SQL Server Top 75 SSAS Interview Questions and Answers For Beginners & Experts
Prepare for your SSAS interview with our comprehensive guide featuring 75 top SQL Server Analysis Services interview questions…
SQL Server How to Become a SQL Database Administrator?
How to become a sql database administrator In 2025, discover what these professionals do, explore how much they earn and learn…
SQL Server OLAP vs OLTP: Key Differences, Architectures, Performance & Real-World Examples
Compare OLTP vs OLAP with clear definitions, architecture diagrams, real-world examples, and FAQs. Learn when to use each system…
SQL Server 70+ Most Asked SSIS Interview Questions for Freshers & Experienced
Prepare for your next SQL Server Integration Services (SSIS) interview with our top 70+ SSIS interview questions and answers.…