Language:

Search

How to change column name in SQL?

  • Share this:
post-title

The syntax for Oracle,MySQL,MariaDB

ALTER TABLE table_name
RENAME TO new_table_name;

The syntax for MariaDB

ALTER TABLE table_name
CHANGE COLUMN old_name TO new_name;

The syntax for MySQL, Oracle

ALTER TABLE table_name
RENAME COLUMN old_name TO new_name;
Ammar Javed

Ammar Javed

Still Learning | Still Searching | Still Exploring | The secret of your success is determined by your daily agenda.